bureus / MMM-Vasttrafik-PublicTransport

Initial commit
9 stars 6 forks source link

Stuck at white "Västtrafik" loading pic #12

Closed fillilutten closed 4 years ago

fillilutten commented 4 years ago

I've been trying to get this up and running but can't for my life figure out what I've done wrong. The module is stuck and only shows the white Västtrafik logo.

What I've done

My config: Skärmavbild 2020-05-01 kl  19 58 29

What could be wrong?

fillilutten commented 4 years ago

Hm....so 3h later, did nothing. But now it started to work. What could have happend?

bureus commented 4 years ago

Hi @fillilutten, great that it solved itself. When you see a stuck västtrafik banner it means that something went wrong when trying to initialize the board, usually a hard error like 500 from the API. Often it solves itself by a magic mirror restart. It could be several reasons such as connection failures, authentication problems, bugs, etc. The best is for you to look through your logs. They are being printed into MagicMirror-out-x.log, usually located under /home/pi/.pm2/logs/MagicMirror-out-0.log. Look for log traces which starts with MMM-Vasttrafik-PublicTransport. If you find any please share them directly with me over PM and I can have a look.

Here are some examples:

[07:02:11.447] [LOG] 07:02:11 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":0,"message":"Unclassified Authentication Failure","description":"Access failure for API: /bin/rest.exe/v2, version: v2"}} [08:07:16.492] [LOG] 08:07:16 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [08:13:09.186] [LOG] 08:13:09 MMM-Vasttrafik-PublicTransport: getDeparture failed =RequestError: Error: connect ECONNRESET 193.183.128.134:443 [08:15:27.896] [LOG] 08:15:27 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 500 - {"fault":{"code":101504,"type":"Status report","message":"Runtime Error","description":"Send timeout"}} [09:12:21.041] [LOG] 09:12:20 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [10:17:24.432] [LOG] 10:17:24 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [11:22:27.752] [LOG] 11:22:27 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [12:16:14.636] [LOG] 12:16:14 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 500 - {"fault":{"code":101504,"type":"Status report","message":"Runtime Error","description":"Send timeout"}} [12:27:30.984] [LOG] 12:27:30 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [13:32:34.351] [LOG] 13:32:34 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [14:37:38.019] [LOG] 14:37:37 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 401 - {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /bin/rest.exe/v2, version: v2. Make sure your have given the correct access token"}} [14:51:10.499] [LOG] 14:51:10 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 500 - {"fault":{"code":101504,"type":"Status report","message":"Runtime Error","description":"Send timeout"}} [15:01:26.064] [LOG] 15:01:26 MMM-Vasttrafik-PublicTransport: getDeparture failed =StatusCodeError: 500 - {"fault":{"code":101504,"type":"Status report","message":"Runtime Error","description":"Send timeout"}}

bureus commented 4 years ago

Closing this issue, for now, please reopen if you find anything within your logs that you want me to look into :)

daahl commented 1 year ago

I have the same issue currently. I've done the same steps as @fillilutten mentioned. However, for me, the white Västtrafik page remains. This is the error message printed to the log:

[12.07.2023 14:07.42.243] [LOG] 14:07:42 MMM-Vasttrafik-PublicTransport: generateAccessToken failed =StatusCodeError: 401 - "" [12.07.2023 14:07.42.349] [WARN] Unhandled rejection ReferenceError: reject is not defined at /home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_helper.js:78:11 at tryCatcher (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/home/admin/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:1 5:14) at processImmediate (internal/timers.js:456:21)

Could they have changed something when they switched to Reseplaneraren v4? Let me know if you need any more information.