Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not appearing #95

Closed
ghost opened this issue Jan 24, 2021 · 23 comments
Closed

Module not appearing #95

ghost opened this issue Jan 24, 2021 · 23 comments

Comments

@ghost
Copy link

ghost commented Jan 24, 2021

Hey thanks for this module! The old version was working great for me, but since updating it never starts. In other words, my MM works fine but the traffic times never show up from this module. I've been looking at my code and can't find anything - if my code seems ok could it be that I missed something when registering with Mapbox even tho I have an API? Did I need to do something with them after I have that API key?

Here's my code:
image

I've double check the API key and the whole thing is typed correctly (not all shown here)

@Gr1dL0ck23
Copy link

i am getting the same kind of thing,

i can see it on the magic mirror the car icon but stays on 'loading'

this similar to you ?

@saml-dev
Copy link
Owner

Hey there, sorry for the delayed response. I haven't been able to reproduce this issue. I added error handling so that when an invalid API key is used, the module shows that (see pic). So I'm not sure what's going on in your case. Are you able to look at the logs and see if there's any other info?
image

@hobbes19
Copy link

Same. Not working for me either. Could it be that i didn't instal the dependencies? How do I do that?

@saml-dev
Copy link
Owner

To install the dependencies, just navigate into the MMM-traffic directory and run npm install

@hobbes19
Copy link

cool. now its showing up but i'm getting an error stating "API Error - InvalidInput Coordinate is invalid". I reversed the google maps coordinates though as you mention. Anything you can think of?

@hobbes19
Copy link

i got it! i had a space between the coordinates. thanks Sam!

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 1, 2021 via email

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 1, 2021 via email

@saml-dev
Copy link
Owner

saml-dev commented Mar 2, 2021

@Gr1dL0ck23 to install the dependencies, navigate into the MMM-Traffic directory on your device and run npm install

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 2, 2021 via email

@saml-dev
Copy link
Owner

saml-dev commented Mar 3, 2021

Going back to my comment from a couple weeks ago, are you able to provide any logs or additional info about your setup? A config or anything? Otherwise I'm afraid I can't help you

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 3, 2021 via email

@saml-dev
Copy link
Owner

saml-dev commented Mar 5, 2021

Thanks for this @Gr1dL0ck23 . I'm very confused where that error is coming from but it at least gives me a place to start. Can you do me a favor, run git pull inside your MMM-Traffic directory just to confirm you're on the latest version?

@saml-dev
Copy link
Owner

saml-dev commented Mar 5, 2021

hey @FyLapS @Gr1dL0ck23 I just pushed a new version that fixes the error that was in the logs that @Gr1dL0ck23 posted in his link above. It's a very odd error so I'm a bit skeptical that this is actually a fix, but run git pull inside your MMM-Traffic directory to pull the latest version, then fire it up and see if it works for you now. Let me know if it does please.

@saml-dev
Copy link
Owner

saml-dev commented Mar 5, 2021

Okay after some more thought and another tweak, I am now more confident in this fix. I believe this issue is being caused by a different third party module and that's why I haven't been able to reproduce it. @Gr1dL0ck23 please send me a list of the other third party modules you are using so that I can narrow down which one is causing the problem and reach out to the developer to help them get a fix. Or if you'd like, you can disable your other modules one by one until your MMM-Traffic works to see which one is the culprit and then let me know.

If you git pull, I'm confident MMM-Traffic will start working for you.

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 5, 2021 via email

@ghost
Copy link
Author

ghost commented Mar 5, 2021 via email

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 5, 2021 via email

@saml-dev
Copy link
Owner

saml-dev commented Mar 5, 2021

@Gr1dL0ck23 you're absolutely right! I went to the code for that module, and spotted the problem immediately. It looks like there has been a PR open for 2 years to delete the line that is breaking other people's code but hasn't been merged by the owner unfortunately. May be best to stay away from that module unfortunately until the owner is able to invest the time to fix it.

@saml-dev
Copy link
Owner

saml-dev commented Mar 5, 2021

If you want to continue using that module, let me know and I'll tell you what to delete to make sure it doesn't interfere with other modules.

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 5, 2021 via email

@saml-dev
Copy link
Owner

saml-dev commented Mar 6, 2021

Yep, that's right. In the file MMM-GoogleMapsTraffic.js, delete line 106 down at the bottom of the file. It's the line that says

console.log = this.styledMapType;

If you delete that line, you should be able to use both modules. Let me know if that works for you.

@Gr1dL0ck23
Copy link

Gr1dL0ck23 commented Mar 6, 2021 via email

@saml-dev saml-dev closed this as completed Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants