greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers
977 stars 85 forks source link

I can't login with CN number #715

Open Datastore24Kirill opened 5 hours ago

Datastore24Kirill commented 5 hours ago

China phone number not working

`2024-11-08 16:07:28.285 DEBUG (SyncWorker_6) [custom_components.bambu_lab.pybambu] login() 2024-11-08 16:07:28.286 DEBUG (SyncWorker_6) [custom_components.bambu_lab.pybambu] Getting accessToken from Bambu Cloud 2024-11-08 16:07:29.113 ERROR (SyncWorker_6) [custom_components.bambu_lab.pybambu] Login attempt failed with error code: 403 2024-11-08 16:07:29.114 DEBUG (SyncWorker_6) [custom_components.bambu_lab.pybambu] Response: '

Attention Required! | Cloudflare Please enable cookies. Sorry, you have been blocked You are unable to access bambulab.cn Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. What can I do to resolve this? You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page. Cloudflare Ray ID: 8df5c94a38fc3f4e • Your IP: Click to reveal 81.5.84.10 • Performance & security by Cloudflare ' 2024-11-08 16:07:29.118 ERROR (MainThread) [custom_components.bambu_lab] Failed to connect with error code (403,)`
Datastore24Kirill commented 4 hours ago

Ready to provide Chinese number and password

AdrianGarside commented 3 hours ago

And this is with v2.0.33 of the integration that uses curl_cffi to talk to the Bambu APIs?

Datastore24Kirill commented 1 hour ago

image

`2024-11-08 22:13:18.095 DEBUG (SyncWorker_28) [custom_components.bambu_lab.pybambu] Getting accessToken from Bambu Cloud 2024-11-08 22:13:20.127 ERROR (SyncWorker_28) [custom_components.bambu_lab.pybambu] Login attempt failed with error code: 403 2024-11-08 22:13:20.128 DEBUG (SyncWorker_28) [custom_components.bambu_lab.pybambu] Response: '<!DOCTYPE html>

Attention Required! | Cloudflare

Sorry, you have been blocked

You are unable to access bambulab.cn

Why have I been blocked?

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

' 2024-11-08 22:13:20.130 ERROR (MainThread) [custom_components.bambu_lab] Failed to connect with error code (403,) 2024-11-08 22:13:29.716 DEBUG (SyncWorker_22) [custom_components.bambu_lab.pybambu] Getting accessToken from Bambu Cloud 2024-11-08 22:13:31.566 ERROR (SyncWorker_22) [custom_components.bambu_lab.pybambu] Login attempt failed with error code: 403 2024-11-08 22:13:31.567 DEBUG (SyncWorker_22) [custom_components.bambu_lab.pybambu] Response: '<!DOCTYPE html>

Attention Required! | Cloudflare

Sorry, you have been blocked

You are unable to access bambulab.cn

Why have I been blocked?

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

' 2024-11-08 22:13:31.569 ERROR (MainThread) [custom_components.bambu_lab] Failed to connect with error code (403,)`

AdrianGarside commented 1 hour ago

Are there any restrictions on what browsers you can use in China? I’m wondering if the default browser emulation in curl_cffi is one that would never be seen in China.

Datastore24Kirill commented 1 hour ago

I can try with all browsers and replace any user agent

The problem is that authorization by phone is possible in two ways:

  1. This is authorization with a phone number and a verification code
  2. This is authorization with a phone number and a password, after which a verification code is needed

We have 52,672 people in the community sitting waiting for a decision

Datastore24Kirill commented 1 hour ago

Bambu Handy works, Orca Slicer works, only HA doesn't work

AdrianGarside commented 1 hour ago

Yes. The problem is that Bambu has deployed cloudflare on all endpoints. And cloudflare is very good at detecting any connection attempts that differ from the normal ones. Since the latest version is working everywhere but China, I'm wondering what is different about the connection there that is not different outside of China.