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

Runtime Error: Attempt to invoke virtual method \'android.content.res.XmlResourceParser #548

Closed
rockwellll opened this issue Jul 12, 2019 · 3 comments
Labels
bug stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@rockwellll
Copy link

ive looked in all issues mentioned about this error, but unfortunatly none of them worked for me, here is my setup, only on android
`
RNFetchBlob.config({
fileCache: true
}).fetch("GET", image)
.then(res => {
alert(JSON.stringify(res));
alert(res.path())

    const something= res.base64();
    res.readFile("base64")
    .then(res => {
      const path= `data:image/png;base64,` + res;
      Share.open({
        url: path,
        title: "Share",
      }).catch(err => alert(JSON.stringify(err)));
    })
})

`
when im printing the res it has a value but when passing the path to Share i get that error

AndroidManafest.xml

` <provider
android:name="android.support.v4.content.FileProvider"

    android:authorities="${applicationId}.provider"
    android:grantUriPermissions="true"
    android:exported="false">
    <meta-data
     tools:replace="android:resource"
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/filepaths" />
</provider>`
@rockwellll rockwellll added the bug label Jul 12, 2019
@MateusAndrade
Copy link
Collaborator

MateusAndrade commented Jul 15, 2019

Hi @A7madXatab sorry for the late answer. It looks something related to your fileprovider, i got a similar problem sometime ago and solved this, setting my providers on android.

You can check if your project config follow the guide on the docs?

Edit:
By looking at some issues, sharing a file using RNFetchBlob, etc looks a bit confusing. If anyone can send a PR showing how to use both library's this would be a great at to rn-share

@stale
Copy link

stale bot commented Sep 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.

@stale stale bot added the stale There has been a lack of activity on this issue and it may be closed soon. label Sep 13, 2019
@stale
Copy link

stale bot commented Sep 20, 2019

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

@stale stale bot closed this as completed Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants