Closed sleodc closed 3 years ago
Did you delete the token.json
file before re-running the first_auth.js
? If not, be sure to do that, otherwise the authentication will just be skipped.
yes I did. I even deleted the whole module and re-install it.
Then please enable the debug setting and paste the startup log so we can see whats going on and where it is failing.
Sorry im not sure what is important so i took the whole thing..
pi@raspberrypi:~/MagicMirror $ npm start
magicmirror@2.14.0 start /home/pi/MagicMirror DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
[03.04.2021 23:41.14.289] [LOG] Starting MagicMirror: v2.14.0
[03.04.2021 23:41.14.299] [LOG] Loading config ...
[03.04.2021 23:41.14.312] [LOG] Loading module helpers ...
[03.04.2021 23:41.14.317] [LOG] No helper found for module: alert.
[03.04.2021 23:41.14.320] [LOG] No helper found for module: clock.
[03.04.2021 23:41.14.322] [LOG] No helper found for module: calendar_monthly.
[03.04.2021 23:41.14.938] [LOG] Initializing new module helper ...
[03.04.2021 23:41.14.941] [LOG] Module helper loaded: MMM-3Day-Forecast
[03.04.2021 23:41.15.558] [LOG] Initializing new module helper ...
[03.04.2021 23:41.15.561] [LOG] Module helper loaded: MMM-SG-Transport-V2
[03.04.2021 23:41.16.035] [LOG] Initializing new module helper ...
[03.04.2021 23:41.16.037] [LOG] Module helper loaded: MMM-Screencast
[03.04.2021 23:41.16.751] [LOG] Initializing new module helper ...
[03.04.2021 23:41.16.753] [LOG] Module helper loaded: MMM-NowPlayingOnSpotify
[03.04.2021 23:41.16.782] [LOG] Initializing new module helper ...
[03.04.2021 23:41.16.783] [LOG] Module helper loaded: MMM-Spotify
[03.04.2021 23:41.16.829] [LOG] Initializing new module helper ...
[03.04.2021 23:41.16.831] [LOG] Module helper loaded: newsfeed
[03.04.2021 23:41.16.980] [LOG] Initializing new module helper ...
[03.04.2021 23:41.16.982] [LOG] Module helper loaded: MMM-quote-of-the-day
[03.04.2021 23:41.17.340] [LOG] Initializing new module helper ...
[03.04.2021 23:41.17.342] [LOG] Module helper loaded: MMM-Remote-Control
[03.04.2021 23:41.17.343] [LOG] No helper found for module: MMM-StopwatchTimer.
[03.04.2021 23:41.17.635] [LOG] Initializing new module helper ...
[03.04.2021 23:41.17.637] [LOG] Module helper loaded: MMM-FastNotes
[03.04.2021 23:41.20.874] [LOG] Initializing new module helper ...
[03.04.2021 23:41.20.875] [LOG] Module helper loaded: MMM-GoogleAssistant
[03.04.2021 23:41.23.064] [LOG] Initializing new module helper ...
[03.04.2021 23:41.23.067] [LOG] Module helper loaded: MMM-Assistant2Display
[03.04.2021 23:41.23.068] [LOG] All module helpers loaded.
[03.04.2021 23:41.23.243] [LOG] Starting server on port 8080 ...
[03.04.2021 23:41.23.260] [LOG] Server started ...
[03.04.2021 23:41.23.261] [LOG] Connecting socket for: MMM-3Day-Forecast
[03.04.2021 23:41.23.263] [LOG] MMM-3Day-Forecast helper, started...
[03.04.2021 23:41.23.264] [LOG] Connecting socket for: MMM-SG-Transport-V2
[03.04.2021 23:41.23.265] [LOG] Connecting socket for: MMM-Screencast
[03.04.2021 23:41.23.267] [LOG] Connecting socket for: MMM-NowPlayingOnSpotify
[03.04.2021 23:41.23.269] [LOG] Connecting socket for: MMM-Spotify
[03.04.2021 23:41.23.270] [LOG] Connecting socket for: newsfeed
[03.04.2021 23:41.23.272] [LOG] Starting node helper for: newsfeed
[03.04.2021 23:41.23.273] [LOG] Connecting socket for: MMM-quote-of-the-day
[03.04.2021 23:41.23.274] [LOG] MMM-quote-of-the-day helper started
[03.04.2021 23:41.23.280] [LOG] Connecting socket for: MMM-Remote-Control
[03.04.2021 23:41.23.281] [LOG] Starting node helper for: MMM-Remote-Control
[03.04.2021 23:41.23.301] [LOG] Connecting socket for: MMM-FastNotes
[03.04.2021 23:41.23.302] [LOG] Starting module helper: MMM-FastNotes
[03.04.2021 23:41.23.304] [LOG] Connecting socket for: MMM-GoogleAssistant
[03.04.2021 23:41.23.305] [LOG] Connecting socket for: MMM-Assistant2Display
[03.04.2021 23:41.23.307] [LOG] Sockets connected & modules started ...
[03.04.2021 23:41.23.719] [LOG] Launching application.
[03.04.2021 23:41.23.761] [WARN] (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397
[03.04.2021 23:41.30.528] [LOG] Create new news fetcher for url: http://www.channelnewsasia.com/rssfeeds/8395986 - Interval: 300000
[03.04.2021 23:41.30.614] [LOG] Create new news fetcher for url: http://www.channelnewsasia.com/rssfeeds/8396082 - Interval: 300000
[03.04.2021 23:41.30.617] [LOG] Create new news fetcher for url: http://www.channelnewsasia.com/rssfeeds/8395954 - Interval: 300000
[03.04.2021 23:41.30.620] [LOG] Create new news fetcher for url: http://www.channelnewsasia.com/rssfeeds/8395884 - Interval: 300000
[03.04.2021 23:41.30.623] [LOG] MMM-quote-of-the-day received a socket notification: INIT_HELPER - Payload: [object Object]
[03.04.2021 23:41.30.624] [LOG] MMM-quote-of-the-day received a socket notification: GET_QUOTE - Payload: [object Object]
[03.04.2021 23:41.30.689] [LOG] [GA] MMM-GoogleAssistant Version: 2.5.3
[03.04.2021 23:41.30.700] [LOG] [GA] YouTube Search Function initilized.
[03.04.2021 23:41.30.716] [LOG] [GA] RECIPE_LOADED: with-MMM-TelegramBot.js
[03.04.2021 23:41.30.734] [LOG] [GA] RECIPE_LOADED: with-A2DSpotify.js
[03.04.2021 23:41.30.738] [LOG] [GA] Assistant2Display Server Started
[03.04.2021 23:41.30.749] [LOG] [GA] Use native program (mpg321) for audio response
[03.04.2021 23:41.30.751] [LOG] [SOUND] mpg321 Initialized
[03.04.2021 23:41.30.756] [LOG] [NPM] Initialized v0.9.93
[03.04.2021 23:41.31.049] [LOG] [GA] Google Assistant is initialized.
[03.04.2021 23:41.31.057] [LOG] [A2D] MMM-Assistant2Display Version: 2.6.0
[03.04.2021 23:41.31.064] [LOG] [INTERNET] Internet v1.0.0 Initialized...
[03.04.2021 23:41.31.070] [LOG] [CAST] Cast v1.1.0 Initialized...
[03.04.2021 23:41.31.103] [LOG] [SPOTIFY:ERROR] Token not found! /home/pi/MagicMirror/modules/MMM-Assistant2Display/node_modules/@bugsounet/token.json
[03.04.2021 23:41.31.116] [LOG] [SPOTIFY:ERROR] Token Error ! ./token.json
[03.04.2021 23:41.31.120] [LOG] [SPOTIFY] Launch Librespot...
[03.04.2021 23:41.31.139] [LOG] [NPM] Initialized v0.9.93
[03.04.2021 23:41.31.492] [LOG] [A2D] Assistant2Display is initialized.
[03.04.2021 23:41.31.500] [ERROR] (node:25116) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[03.04.2021 23:41.31.516] [ERROR] Whoops! There was an uncaught exception...
[03.04.2021 23:41.31.529] [ERROR] Error: listen EADDRINUSE: address already in use :::8569
at Server.setupListenHandle [as _listen2] (net.js:1300:14)
at listenInCluster (net.js:1348:12)
at Server.listen (net.js:1436:7)
at Function.listen (/home/pi/MagicMirror/modules/MMM-Assistant2Display/node_modules/express/lib/application.js:618:24)
at DialServer.start (/home/pi/MagicMirror/modules/MMM-Assistant2Display/node_modules/@bugsounet/cast/index.js:90:23)
at Class.addons (/home/pi/MagicMirror/modules/MMM-Assistant2Display/node_helper.js:247:17)
at Class.initialize (/home/pi/MagicMirror/modules/MMM-Assistant2Display/node_helper.js:184:12)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-Assistant2Display/node_helper.js:45:14)
at Socket.
Okay, pretty messy there.
First off, it seems you have another instance of MM²
running, or there are some ghost processes running on your device (multiple port binds fail, because the port is already in use - MMM-Assistant2Display
f.e.).
Try to reboot the device to have a clean status.
Second these Spotify error messages are mixed up. For whatever reason MMM-Assistant2Display
is also sending [SPOTIFY:ERROR]
messages. All these lines seem to come from that particular module:
[03.04.2021 23:41.31.103] [LOG] [SPOTIFY:ERROR] Token not found! /home/pi/MagicMirror/modules/MMM-Assistant2Display/node_modules/@bugsounet/token.json
[03.04.2021 23:41.31.116] [LOG] [SPOTIFY:ERROR] Token Error ! ./token.json
[03.04.2021 23:41.31.120] [LOG] [SPOTIFY] Launch Librespot...
Taking a look at that module, something pops out:
- MMM-Spotify module or
useIntegred
version but do not use both at the same time!
If you want to use MMM-Spotify
you need to set useIntegred
config option of the MMM-Assistant2Display
module to false
.
Otherwise keep Spotify from that Assistant2Display module and remove MMM-Spotify
. You should only run one.
Besides from that, it seems that MMM-Spotify
is not even loading. Probably because of the latest version requirement from this module. To run the latest version 2.0.2
of MMM-Spotify
you need to update MM²
to version 2.15.0
. You are running 2.14.0
:
[03.04.2021 23:41.14.289] [LOG] Starting MagicMirror: v2.14.0
Verify MMM-Spotify
version by searching for the line containting "version" in this file:
/home/pi/MagicMirror/modules/MMM-Spotify/package.json
If it says:
{
"name": "MMM-Spotify",
"version": "2.0.2",
[...]
you should update MM²
.
Alternatively you could switch to version 2.0.1
of MMM-Spotify
but that is not recommended, as you then will not be getting any automated updates in the future.
Yes it works now! Thank you so much 🙏🏻
I've got MMM-Spotify, MMM-Assistant2Display and MMM-GoogleAssistant installed successfully and authenticated successfully. Ive got Spotify-token.json and token.json in the respective modules folder. However the MMM-spotify does not display and when I tried to run voice control with assistant2display to command Spotify (ie. SPOTIFY PLAY), I get the error [SPOTIFY: ERROR]: token.json error
It was running fine before, but when I had to change to another Spotify account with a new client ID and client secret generated, it doesn't work now. I suspect the MMM-spotify is still linking to my older Spotify account. I have already re-installed the module and re-authenticated with the new client id and secret but it still does not work. Please help thank you!