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

Can't link my SmartNora account to the devices in nodered #287

Closed
Shikaban opened this issue Nov 30, 2023 · 19 comments
Closed

Can't link my SmartNora account to the devices in nodered #287

Shikaban opened this issue Nov 30, 2023 · 19 comments

Comments

@Shikaban
Copy link

I'm getting not connected under the each node of smartnora,
And in the debug this is what is reporting, am I doing something wrong?
image

@andrei-tatar
Copy link
Owner

@Shikaban can you post full logs?
It seems like there's an issue with the network/internet access on your machine and nora can't access the internet:

image

@jvdpas
Copy link

jvdpas commented Dec 1, 2023

After updating from 1.20.0 to 1.21.0 im also not able to authenticate.
12/1/2023, 7:51:29 PM
msg : string[67]
"nora: FirebaseError: Firebase: Error (auth/network-request-failed)."

I am able to login https://smart-nora.eu/my-nora
Maybe something to do with google 2FA?

@jvdpas
Copy link

jvdpas commented Dec 1, 2023

After reverting to1.20.0 tried to login via nora config node. The "link account" shows "instance unknown to link" See screenshot below.

unknown

@Shikaban
Copy link
Author

Shikaban commented Dec 1, 2023

After reverting to1.20.0 tried to login via nora config node.

unknown

Even for me the same popup after I click ok it's going in a loop where is not logging in , same for me unknokwn appear.

@Shikaban
Copy link
Author

Shikaban commented Dec 1, 2023

@Shikaban can you post full logs?

It seems like there's an issue with the network/internet access on your machine and nora can't access the internet:

image

Hi andrei yes I will share it as soon il get back to my home that screenshot was taken from my iPhone as I was out of my home for work, when I'm back i will share better photo , the account is a premium account and the subscription is active with a renew at 3º of this month.
Just give me like 15 hours I'm going to take-off in this moment

@Shikaban
Copy link
Author

Shikaban commented Dec 2, 2023

My user id:

vqIWAc8vGpSiquZ6GEozbtuposm1

image

@andrei-tatar
Copy link
Owner

andrei-tatar commented Dec 3, 2023

@Shikaban it's not clear to me what is happening. Have you been able to check the internet access on the device you're running node-red on? The error is the same (network-request-failed).

Can you try pinging identitytoolkit.googleapis.com (eg: ping identitytoolkit.googleapis.com).

Do you have any firewall rules setup or something else that could block the network traffic to the node-red instance?

@andrei-tatar
Copy link
Owner

After reverting to1.20.0 tried to login via nora config node. The "link account" shows "instance unknown to link" See screenshot below.

This might be related to the browser you're using and shouldn't impact the login. What browser/os are you using?

@Shikaban
Copy link
Author

Shikaban commented Dec 3, 2023

@Shikaban it's not clear to me what is happening. Have you been able to check the internet access on the device you're running node-red on? The error is the same (network-request-failed).

Can you try pinging identitytoolkit.googleapis.com (eg: ping identitytoolkit.googleapis.com).

Do you have any firewall rules setup or something else that could block the network traffic to the node-red instance?

Yes I've disabled the pihole that I was using just to be sure but all of that happened after I've updated to the last version, I was using the 1.18.2 for a while so I've just updated firstly to the 1.20 and after to the 1.21 as it wasn't working.

Internet is ok I've also tried to disable all the flow and create only one node with SmartNora but nothing.
Ping is ok
image

Also tried to link a new account just for testing purpose but still nothing.

Could I do something more for helping us finding the issue?

I will try to move from buster release to bookworm but I think I'll find the time on the next Saturday , living with a little daughter is a little hard 😆

@andrei-tatar
Copy link
Owner

@Shikaban can you provide more info on the following:

  1. running on a Raspberry Pi?
  2. running debian buster?
  3. node.js version?
  4. node-red version?
  5. is this a new setup and it's not working or on the same setup you have now, it worked before?
  6. what region of the globe are you in? Italy?
  7. is there any other detail in the node-red logs? (if you run sudo journalctl -u nodered -S yesterday > nodered_logs_1day.txt and send over the file nodered_logs_1day.txt - maybe over email).

@jvdpas
Copy link

jvdpas commented Dec 3, 2023

After reverting to1.20.0 tried to login via nora config node. The "link account" shows "instance unknown to link" See screenshot below.

This might be related to the browser you're using and shouldn't impact the login. What browser/os are you using?

Hi Andrea,

I used 2 chrome and firefox.
The 'unknown' is replaced by the local node-red ip when i ''Clear cookies and site data...". But that does not resolve the issue as you stated.

Used ping to check internet access on the PI. That is ok.

Removed "node-red-contrib-smartnora" node from node-red including the global node configuration.
Reinstalled version 1.21.0 and repeated the smart nora twice whith 2 accounts.

From log "nodered_logs_1day.txt"
Dec 03 11:03:49 raspberrypi Node-RED[324]: [2023-12-03T10:03:49.090Z] @firebase/auth: Auth (10.7.0): INTERNAL ASSERTION FAILED: Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill
Dec 03 11:03:49 raspberrypi Node-RED[324]: 3 Dec 11:03:49 - [error] nora: FirebaseError: Firebase: Error (auth/network-request-failed).

No Solution yet. Do you have any ideas?

@andrei-tatar
Copy link
Owner

andrei-tatar commented Dec 3, 2023

@jvdpas - if you could also provide answers to the same questions as above:

  1. running on a Raspberry Pi?
  2. running debian buster?
  3. node.js version?
  4. node-red version?
  5. is this a new setup and it's not working or on the same setup you have now, it worked before?
  6. what region of the globe are you in? Italy?
  7. is there any other detail in the node-red logs? (if you run sudo journalctl -u nodered -S yesterday > nodered_logs_1day.txt and send over the file nodered_logs_1day.txt - maybe over email).

@jvdpas
Copy link

jvdpas commented Dec 3, 2023

  1. yes
  2. NO "Raspbian GNU/Linux 9 (stretch)"
  3. Node.js v14.21.0.
  4. 3.0.2: Maintenance Release
  5. It was a working setup (in use a few years)
  6. No netherlands
  7. snip from log
    Dec 03 11:02:37 raspberrypi Node-RED[324]: [2023-12-03T10:02:37.479Z] @firebase/auth: Auth (10.7.0): INTERNAL ASSERTION FAILED: Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill
    Dec 03 11:02:37 raspberrypi Node-RED[324]: 3 Dec 11:02:37 - [error] nora: FirebaseError: Firebase: Error (auth/network-request-failed).

@andrei-tatar
Copy link
Owner

@jvdpas I think the problem is the one you highlighted in the logs:
Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill.

I was able to reproduce it using the versions you're running. I think the actual problem is the old npm version shipped with node 14.
I'm looking into a fix.
The fastest fix for you would probably be to update node.js to v18 or v20.

@andrei-tatar
Copy link
Owner

@jvdpas @Shikaban
I've published node-red-contrib-smartnora version 1.21.4 (you can install it by running, inside .node-red folder: npm install [email protected]).

The issue was caused by the latest firebase package version. I fixed it to 10.6 and that fixed the issue.

@jvdpas
Copy link

jvdpas commented Dec 3, 2023

@jvdpas @Shikaban I've published node-red-contrib-smartnora version 1.21.4 (you can install it by running, inside .node-red folder: npm install [email protected]).

The issue was caused by the latest firebase package version. I fixed it to 10.6 and that fixed the issue.

Hi Andrei, Thanx nohting else to say ;-)

@jvdpas
Copy link

jvdpas commented Dec 3, 2023

It works, Thanx

@Shikaban
Copy link
Author

Shikaban commented Dec 3, 2023

I was going to give you all the information but you've already manage to fix it!
Thanks a lot Andrei!
All is working as intended,
I will still try to update to bookworm so I can keep the last version of node.js

Again I'll appreciate what you have done!

@jvdpas
Copy link

jvdpas commented Dec 3, 2023

I was going to give you all the information but you've already manage to fix it! Thanks a lot Andrei! All is working as intended, I will still try to update to bookworm so I can keep the last version of node.js

Again I'll appreciate what you have done!

Hi Shikaban, could you please close the ticket. ThanX

@Shikaban Shikaban closed this as completed Dec 3, 2023
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