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
Fix iOS auth for resumable uploads in Storage Emulator #4184
Conversation
60314eb
to
6426f64
Compare
6426f64
to
30ad6d6
Compare
Were you able to verify the ios sdk now works with these changes? |
Sort of... I ran the example against the changes. But I still need to set up the iOS integration tests as discussed and try it out there. |
@tohhsinpei I'm currently running into this issue (last couple of days). How can I get this fix early? |
@hixfield We're working on a new release but in the meantime you could clone this repo and work off a local build; instructions here. |
With firebase-tools 10.2.2. that according to the release notes contains this fix I still get
and emulator crash with this in rule in
If I have this in rule:
The emulator crashes with:
|
@yareeh I wasn't able to reproduce this. Could you provide the full contents of your |
@tohhsinpei – I updated the iOS SDK to 8.13.0 and now it works. |
Description
Issue(s)
This PR fixes #3550, possibly also #3584, #3765, and #3890.
Any upload via the iOS SDK gated by auth rules causes the Storage Emulator to crash. A permissions error occurs on the iOS side.
Cause
A resumable upload consists of two requests:
start
andupload, finalize
. Clients are only expected to include anAuthorization
header in the first request. The 403 occurs because the emulator is expecting it in the second request as well. This bug does not occur for the other SDKs because they include the auth header in every request (e.g. JS, Android).Scenarios Tested
Tested against example linked in issue and verified that 403 does not occur after fix.