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

While uploading a blob using Fetch app crashes on iOS #20895

Closed
bhavukjain1 opened this issue Aug 28, 2018 · 1 comment
Closed

While uploading a blob using Fetch app crashes on iOS #20895

bhavukjain1 opened this issue Aug 28, 2018 · 1 comment
Labels
🌐Networking Related to a networking API. Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@bhavukjain1
Copy link

I'm trying to upload my file to a pre-signed URL using fetch:

let url = `data:image/png;base64,${response.data}`
fetch(url)
   .then(res => res.blob())
   .then(blob => {
      fetch(s3URL, {method:'PUT', body:blob})
   })

I get this error:

Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking sendRequest on target Networking with params (
        {
        data =         {
            blob =             {
                blobId = "e292f653-6729-498c-9020-8ea47a0f277f";
                lastModified = 1535473043365;
                offset = 0;
                size = 690263;
                type = "";
            };
            trackingName = unknown;
        };
        headers =         {
        };
        incrementalUpdates = 0;
        method = PUT;
        responseType = text;
        timeout = 0;
        url = "https://example.com";
        withCredentials = 0;
    },
    387
)
callstack: (
	0   CoreFoundation                      0x0000000183dceda4 <redacted> + 252
	1   libobjc.A.dylib                     0x0000000182f885ec objc_exception_throw + 56
	2   CoreFoundation                      0x0000000183d67750 _CFArgv + 0
	3   CoreFoundation                      0x0000000183ca00cc <redacted> + 352
	4   CoreFoundation                      0x0000000183c9ff48 <redacted> + 64
	5   QuizOn_New                          0x00000001049486ec -[RCTBlobManager handleNetworkingRequest:] + 664
	6   QuizOn_New                          0x0000000104ba1934 -[RCTNetworking processDataForHTTPQuery:callback:] + 1436
	7   QuizOn_New                          0x0000000104ba06e0 -[RCTNetworking buildRequest:completionBlock:] + 3108
	8   QuizOn_New                          0x0000000104ba6d10 -[RCTNetworking sendRequest:responseSender:] + 232
	9   CoreFoundation                      0x0000000183dd6580 <redacted> + 144
	10  CoreFoundation                      0x0000000183cb5748 <redacted> + 284
	11  CoreFoundation                      0x0000000183cba56c <redacted> + 60
	12  QuizOn_New                          0x00000001049def30 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2064
	13  QuizOn_New                          0x0000000104a89b60 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 664
	14  QuizOn_New                          0x0000000104a896f0 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 132
	15  QuizOn_New                          0x0000000104a89660 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
	16  libdispatch.dylib                   0x000000010565d260 _dispatch_call_block_and_release + 24
	17  libdispatch.dylib                   0x000000010565d220 _dispatch_client_callout + 16
	18  libdispatch.dylib                   0x000000010566be80 _dispatch_queue_serial_drain + 768
	19  libdispatch.dylib                   0x0000000105660730 _dispatch_queue_invoke + 328
	20  libdispatch.dylib                   0x000000010566cdd8 _dispatch_root_queue_drain_deferred_wlh + 352
	21  libdispatch.dylib                   0x0000000105673ebc _dispatch_workloop_worker_thread + 676
	22  libsystem_pthread.dylib             0x00000001839f3e70 _pthread_wqthread + 860
	23  libsystem_pthread.dylib             0x00000001839f3b08 start_wqthread + 4
)

RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_queue_serial_drain
_dispatch_queue_invoke
_dispatch_root_queue_drain_deferred_wlh
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread
@react-native-bot react-native-bot added 🌐Networking Related to a networking API. Platform: iOS iOS applications. labels Aug 28, 2018
@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you'd like to propose a change or discuss a feature request, there is a repository dedicated to Discussions and Proposals you may use for this purpose.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. 📋No Template labels Aug 28, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Aug 28, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🌐Networking Related to a networking API. Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants