Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

App Crash when downloading PDF from PHP route URL  #498

Open
@RiusmaX

Description

@RiusmaX

Hi,

I try to download a dynamically generated PDF from a PHP API, so I do not have a ".pdf" in my url.

Here is the code (URL working via Postman) :

    RNFetchBlob
    .config({
      fileCache: true,
      appendExt: 'pdf'
    })
    .fetch('GET', API + '/xxx/' + xxx.id + '/xxx', {
      headers: {
        'Authorization': 'Bearer ' + this.props.token,
        'Content-Type': 'application/pdf',
        'Accept': 'application/pdf'
      }
    }).then((res) => {
      // do something with the pdf
    }).catch((err) => {
      console.tron.log(err) // not working
    })

The application simply crash with just this information in the XCode console :

[__NSDictionaryM length]: unrecognized selector sent to instance 0x608000449a80
Uncaught exception: -[__NSDictionaryM length]: unrecognized selector sent to instance 0x608000449a80
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM length]: unrecognized selector sent to instance 0x608000449a80'

Has anyone ever had this problem?
I am in favor of any idea that can help me to solve this problem.

iOS testing version : 10.3
RN version : 0.39.2
RN-fetch-blob version : 0.10.8

Thanks in advance !

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions