-
Notifications
You must be signed in to change notification settings - Fork 118
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
Partial Download does not include range header (null value) #462
Comments
I tried this out – and it worked fine - #467
|
would you include the full stack trace? That might help... |
This is the stacktrace I get. |
Ah! Look at chrome console. Do you see errors/warnings about not being allowed to set certain headers? the browser controls the headers that client code can send |
Ha! "Content-Range" vs 'content-range' !!!
That's annoying. I can try a fix quick...
…On Thu, Nov 3, 2022 at 11:00 AM JeanNicolasdeLamballerie < ***@***.***> wrote:
I am currently using Edge and Chrome for debugging, and it turns out to be
weirder than I thought ;
Actually, the request itself completes, with the proper params :
[image: image]
<https://user-images.githubusercontent.com/55099344/199797839-c5361653-85db-4d0b-b33c-e9a591306932.png>
[image: image]
<https://user-images.githubusercontent.com/55099344/199797950-6f08f4c1-6f66-4b96-8c37-71a0d9eed231.png>
I do even get the response :
[image: image]
<https://user-images.githubusercontent.com/55099344/199798092-0888020b-e3c9-4422-9927-0add9e72f537.png>
I have no specific error related to headers, only a dart error popping up :
[image: image]
<https://user-images.githubusercontent.com/55099344/199798399-1f3e032e-05ee-4774-988f-5bd923c4d455.png>
I haven't tested on android for now, as I upgraded this project and need
to also make sure to use JDK11 first.
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEFCVIN5WIJXZG4YFRNH3WGP4TVANCNFSM6AAAAAARRDC4GI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@JeanNicolasdeLamballerie – could you patch in #468 and try it out? |
dependency_overrides:
_discoveryapis_commons:
git:
url: https://github.com/google/googleapis.dart
ref: i462_fix_header_casing
path: discoveryapis_commons |
Sorry @kevmoo , I was indeed struggling with my pubspec.yaml. |
Check your pubspec.lock file – is it pointing at the github link? Is the error exactly the same? Can you include it? I'd love to have line numbers with the new code... |
Disregard this, it doesn't, I just messed up the two requests because the preflight completed after the request. |
See here: https://stackoverflow.com/questions/53259737/content-range-working-in-safari-but-not-in-chrome I'll dig some more! |
It might be related to the access-control-expose-header from the response not including Content-Range. I commented the error directly in the library and the request does return the proper stream in that case. I manage to get the first few bytes. Maybe the lib should use the Content-Length instead to check if the range value is correct ? |
Remove check that cannot be done in the browser Also remove invalid header sets for HTTP requests in the browser Fixes #462
Now it's fixed! I also checked it |
|
Hello guys ! Before anything, I'd like to preface this by saying it might be an error in implementation from my part; if this is the case I have misunderstood how the flow of the drive API works. I have tried getting help on Stackoverflow, but no one ever answered my post.
Here's my issue :
I am creating a small application based on audio files stored on Google Drive, in Flutter.
I am using the drive api to make my requests, with these scopes in my google sign in :
I have an auth element and handle signing in and out. Until then, no issues.
I can also request my files with an implementation looking like this, where I implemented a passed down API instance :
This works perfectly, and so does :
But since I'd like to retrieve some of the Metadata included in my audio files, and since the drive API doesn't natively support extracting audio metadata and sending it as a google metadata, I thought I'd extract it with a partial download on the file itself.
Here's the catch : I can't seem to get the partial download to work.
Based on the doc, I thought the implementation would look something like this :
But this always throws this error :
I tried using it on Wav files, but also MP4 files. The error is always the same, which leads me to believe it's my implementation that's somehow wrong, but I'm not sure what I'm supposed to do to fix it. Is it my request missing the header ? The response not including it ?
While very clear, that error doesn't help me troubleshoot my issue at all. I can't seem to find any documentation on how to conduct a partial media request. I haven't found any example projects to compare it with.
PartialDownloadOptions does not have much documentation.
I could make a partial request through the download links with a homemade http request (which is how I can read the music to begin with) but the drive API supposedly allows this. Could anyone help me correct my implementation, or confirm this is a bug ?
The text was updated successfully, but these errors were encountered: