no problem thanks in advanced !Toonz wrote:The login process seems to be broken again lately for the Postnl app. Will have a look again, but not soon due to other commitments next week
Toon app: PostNL
Moderators: marcelr, TheHogNL, Toonz
-
- Starting Member
- Posts: 8
- Joined: Sat Feb 01, 2020 10:32 pm
Re: Toon app: PostNL
Re: Toon app: PostNL
For me the actual login is still working.Toonz wrote:The login process seems to be broken again lately for the Postnl app. Will have a look again, but not soon due to other commitments next week
I still see a recent json file on the Toon with valid data in /tmp, so the real login is still working. But the Tile is still saying " Bezig met inloggen". Only processing after it is not showing a result in my case.
The cause was I had a first entry on the receiver json which was blocking showing the result in someway. After removing this one in the POSTNL App (not website) it was showing all results again.
This was an entry according to the website " Nog niet te volgen".
The contents of the json was:
Code: Select all
"receiver": [{
"shipmentType": "Pending",
"effectiveDate": "0001-01-01T00:00:00+00:00",
"key": "3SQDBN891119901-NL-xxxxAW",
"barcode": "3SQDBN891119901",
"country": "NL",
"postalCode": "xxxxAW",
"isInternational": false,
"product": null,
"description": null,
"pickup": null,
"delivery": {
"barcode": "3SQDBN891119901",
"status": "InTransit",
"phase": {
"index": null,
"message": "Shipment not yet found",
"route": null
},
"returnEligibility": null,
"firstDeliveryAttemptExpired": false,
"firstDeliveryAttemptDate": null,
"isDelivered": false,
"hasProofOfDelivery": false,
"deliveryDate": null,
"timeframe": null,
"deliveryStatusType": "Standard"
},
"rerouting": {
"barcode": "3SQDBN891119901",
"unavailabilityReason": null,
"availableOptions": {},
"rerouteInstruction": null,
"isAvailable": false,
"sponsorName": null
},
"beforeFirstDeliveryAttempt": true,
"firstDeliveryAttemptFailed": false,
"amounts": {},
"extraInformation": [],
"sender": null,
"receiver": null,
"originalReceiver": null,
"return": null,
"deliveryLocation": null,
"dimensions": null,
"multiColloPackages": [],
"notifications": [],
"generatedTitles": {
"receiver": "3SQDBN891119901",
"sender": "3SQDBN891119901"
},
"order": 0,
"trackedShipment": {
"id": 154091940,
"barcode": "3SQDBN891119901",
"postalCode": "xxxxAW",
"country": "NL",
"title": null,
"listNameKey": "receiver",
"box": "Receiver",
"status": "Delivered",
"source": "ManuallyAddedThroughWeb",
"order": null,
"key": "3SQDBN891119901-NL-xxxxAW"
},
"tripInformation": null,
"allObservations": null,
"isReturnShipment": null,
"pickUpRetailBarcode": null
},
I think you can create such an entry by searching in the postnl app (not website) for a non existing barcode and choose " Zending bewaren". Then this entry will be at the start of the receiver list.
So maybe better to filter out this kind of entries.
Maybe also an idea to add a " debug" switch on the settings screen (or always turn it on) and logging the several steps and the outcome (not the json) to a logfile in /tmp. Of course overwriting the logging with every cycle so the filesystem won't fill up.
Re: Toon app: PostNL
Thanks for the tip. Status "Pending" I hadn't seen before indeed. I can image the java code gives an error somewhere on this status and execution is stopped.
I wil also enable debugging all steps by default in tmp.
Will not be soon as I will be travelling coming week.
I wil also enable debugging all steps by default in tmp.
Will not be soon as I will be travelling coming week.
member of the Toon Software Collective
-
- Starting Member
- Posts: 28
- Joined: Tue Feb 18, 2020 11:48 pm
Re: Toon app: PostNL
Hi, I recently rooted my Toon and have several apps up and running like Buienradar and Afvalwijzer. The only app that just won't work for me is PostNL.
- I install the app through the Toonstore.
- I add the tile to the dashboard.
- I open the app by clicking the tile on the dashboard and add my credentials.
- "Bezig met inloggen... via PostNL" is showing on the tile forever. Nothing happens after.
Some info;
- Software version 5.22.14
- Toonstore 5.0.1
- PostNL 1.0.8
No idea what else I can do to make it work. Any suggestions?
Greetz, Tom
- I install the app through the Toonstore.
- I add the tile to the dashboard.
- I open the app by clicking the tile on the dashboard and add my credentials.
- "Bezig met inloggen... via PostNL" is showing on the tile forever. Nothing happens after.
Some info;
- Software version 5.22.14
- Toonstore 5.0.1
- PostNL 1.0.8
No idea what else I can do to make it work. Any suggestions?
Greetz, Tom
Re: Toon app: PostNL
The app isn't working at the moment. The last workaround has now also been blocked by the postnl website.
Maybe we will find another......
Maybe we will find another......
member of the Toon Software Collective
-
- Starting Member
- Posts: 8
- Joined: Sat Feb 01, 2020 10:32 pm
Re: Toon app: PostNL
sorry to hear ill just keep an eye out in this thread hopefully youl find a solution
Re: Toon app: PostNL
The login process has totally changed. They are using now OpenId.Toonz wrote:The app isn't working at the moment. The last workaround has now also been blocked by the postnl website.
Maybe we will find another......
Good News is I have it working now fully automated with Javascript in Postman for my account. I have to test if it is still working after a few days.
-
- Starting Member
- Posts: 28
- Joined: Tue Feb 18, 2020 11:48 pm
Re: Toon app: PostNL
Job well done! Hoping for good News and an update soon!Toonz wrote:Good News is I have it working now fully automated with Javascript in Postman for my account. I have to test if it is still working after a few days.

Re: Toon app: PostNL
Good job. Either send me your postman details or implement yourself in the Toon app and create a pull request on githubglsf91 wrote:The login process has totally changed. They are using now OpenId.
Good News is I have it working now fully automated with Javascript in Postman for my account. I have to test if it is still working after a few days.

Looking forward to the results. Well done.
member of the Toon Software Collective
Re: Toon app: PostNL
Maybe I give it a try to implement (I'am new in QT). For this first a few questions:Toonz wrote:Good job. Either send me your postman details or implement yourself in the Toon app and create a pull request on githubglsf91 wrote:The login process has totally changed. They are using now OpenId.
Good News is I have it working now fully automated with Javascript in Postman for my account. I have to test if it is still working after a few days.
Looking forward to the results. Well done.
(I have read the Developing Toons Apps pdf)
- is there function available for doing a sha256 hash (if yes what is the name)?
- is there function available for generating random bytes (if yes what is the name)?
- more general: how do I know which QT modules and there contents are available at the Toon?
- can i run most of the PostnlApp.qml in QT quick designer (especially the refreshPostNL* stuff) ?
(easier to debug)
if yes, do I need QT quick designer or QT designer?
Re: Toon app: PostNL
Hi glsf91,
I use this function in another app to generate a random string, maybe you can tweak it to your wishes:
I don't use QT Designer, I have a second Toon2 which I use for developments.
I use this function in another app to generate a random string, maybe you can tweak it to your wishes:
Code: Select all
function randomStr(len) {
var ranStr = '';
var arr = "abcdefghijklmnopqrstuvwxyz0123456789";
for (var i = len; i > 0; i--) {
ranStr += arr[Math.floor(Math.random() * arr.length)];
}
return ranStr;
}
member of the Toon Software Collective
Re: Toon app: PostNL
Not that I know of but maybe you can use this and include the js files:glsf91 wrote: - is there function available for doing a sha256 hash (if yes what is the name)?
https://github.com/brillout/forge-sha256
member of the Toon Software Collective
Re: Toon app: PostNL
@Toonz
I now have a problem that with xmlhttprequest as it is always following a redirect. I do not want this because I need to capture something in between.
Do you know there is another way to do a POST request on the Toon (maybe with example)?
And which version of QML /QT is running in the Toon?
I now have a problem that with xmlhttprequest as it is always following a redirect. I do not want this because I need to capture something in between.
Do you know there is another way to do a POST request on the Toon (maybe with example)?
And which version of QML /QT is running in the Toon?
Re: Toon app: PostNL
Unfortunately xmlhttprequest is automatically following redirects, you can't prevent this as far as I know.glsf91 wrote:@Toonz
I now have a problem that with xmlhttprequest as it is always following a redirect. I do not want this because I need to capture something in between.
Do you know there is another way to do a POST request on the Toon (maybe with example)?
And which version of QML /QT is running in the Toon?
Alternative option: use a script file where you do your magic using curl. This file can be executed regularly via a crontab job or alternatively I can expand the tsc script to start it on request of the postnl app.
If the script saves the resulting inbox file I can pick it up in the app again.
I believe the Qt version is 5.1 but can be another 5.x release.
member of the Toon Software Collective
Re: Toon app: PostNL
This indeed a better option. It gives me more control. This also means I can also use this in other systems like Domoticz.Toonz wrote: Alternative option: use a script file where you do your magic using curl. This file can be executed regularly via a crontab job or alternatively I can expand the tsc script to start it on request of the postnl app.
If the script saves the resulting inbox file I can pick it up in the app again.
I made a rough version of the shell script already and it is working for the inbox. I don't know if letters is also going to work because it is from a different source (mobile).
I need to add error checking stuff.
Sometimes it is not working because of invalid hashes I think. I have to debug this further.
So will take some time but there is progress.