You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I configure authentication the upload with platformio_upload.py script is not working. When using the script without authentication everything works fine.
The first thing I noticed in the script is that checkAuthResponse = requests.get(f"{upload_url_compatibility}/update") should be (I think) checkAuthResponse = requests.get(f"{upload_url_compatibility}") otherwise you end up with a URL ending with /upload/upload since upload_url_compatibility already contains /upload.
When using the original script I get the following lines in the log:
Serverconfiguration: autentication not needed.
start-request faild 401
When I remove /upload the script tries to authenticate with doUpdateAuth = requests.get(start_url, headers=start_headers, auth=auth) but it fails with status code 401 again.
I had the same symptoms. To work around the script's bug, make sure to specify custom_upload_url without the /upload part, and without a trailing / as well (this would lead to a 500 error).
When I was left with a 401 error, it was because I was providing my username/password values wrapped in single quotes.
@mleroy removing the /update part from the custom url did the trick. Thanks!
Edit: I did some extra testing and although the terminal shows that the update is successful the firmware is not updated. 🙁
@ayushsharma82 is this something that can be updated/added in the documentation?
When I configure authentication the upload with platformio_upload.py script is not working. When using the script without authentication everything works fine.
The first thing I noticed in the script is that
checkAuthResponse = requests.get(f"{upload_url_compatibility}/update")
should be (I think)checkAuthResponse = requests.get(f"{upload_url_compatibility}")
otherwise you end up with a URL ending with/upload/upload
sinceupload_url_compatibility
already contains/upload
.When using the original script I get the following lines in the log:
When I remove
/upload
the script tries to authenticate withdoUpdateAuth = requests.get(start_url, headers=start_headers, auth=auth)
but it fails with status code401
again.I did configure the correct username and password in the platformio.ini file with
custom_username
andcustom_password
.platformio.ini file:
ElegantOTA setup:
I suppose it has something to do with one of the following lines
but I'm not sure.
Anyone else that has this issue? Or is this issue known?
The text was updated successfully, but these errors were encountered: