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

CompactToken parsing failed with error code: 80049217 #2

Open
denven opened this issue Jan 7, 2023 · 2 comments
Open

CompactToken parsing failed with error code: 80049217 #2

denven opened this issue Jan 7, 2023 · 2 comments
Assignees
Labels
api issue Issue related to API access, or issued caused by the API service resolved

Comments

@denven
Copy link
Owner

denven commented Jan 7, 2023

Bug description:

  • When I formatted the camera SD card and re-hacked my camera with firmware. I found the built-in curl in /usr/bin directory ran with Segment fault failure, so I grabbed the latest curl from official and it worked for the initial setup using the first-time redeemed access token;
  • When the onedrive-uploader runs a second time (be killed and run again or with a camera reboot), the refreshed access token cannot be used to access OneDrive API successfully, and found the error in the log file as this bug's title;
@denven
Copy link
Owner Author

denven commented Jan 7, 2023

This seems a frequent and still existing issue from using OneDrive API here: OneDrive/onedrive-api-docs#785

I believe there is some un-agreed process between the HTTP request from the client program and OneDrive API response, so some programs' requests can pass, and some cannot. And this kind of issue will always exist at different times, or when using a different (version) HTTP client program.

  • Another case found later when I checked the detailed reason for this code of a failed API request is InvalidAuthenticationToken, it is because the access token in the request headers option Authorization is invalid, like using an already expired token or a mal-formatted Bearer token string. For this case, what we need is to check the access token used in request headers if it is expired or in the right format as "Bearer ACCESS_TOKEN_STRING", and use a new valid/renewed token to request.

@denven
Copy link
Owner Author

denven commented Jan 7, 2023

This issue is resolved without changing any code.

@denven denven added the api issue Issue related to API access, or issued caused by the API service label Jan 7, 2023
@denven denven self-assigned this Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api issue Issue related to API access, or issued caused by the API service resolved
Projects
None yet
Development

No branches or pull requests

1 participant