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

Bug Fix Branch 0.11.0 - Solve Android security exposed app error #614

Open
wants to merge 3 commits into
base: 0.11.0
Choose a base branch
from

Conversation

Moreno97
Copy link

This PR is addressed to #358 . It solves the exposed security exception on Android devices with API version >= 24. In older API's the code hasn't changed, still uses file://....

@Jacse
Copy link
Contributor

Jacse commented Dec 3, 2017

Great work, @Moreno97 👍 Hope to see this merged soon and 0.11.0 released.

@Jacse
Copy link
Contributor

Jacse commented Jan 3, 2018

I am getting the following error quite often, though. Don't know if I'm missing something?

* What went wrong:
Execution failed for task ':app:installRelease'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed in /data/app/com.jacoblauritzen.myapp-2: Can't install because provider name com.RNFetchBlob.provider (in package com.jacoblauritzen.myapp) is already used by com.jacoblauritzen.myapp.debug

@Moreno97
Copy link
Author

Moreno97 commented Jan 4, 2018

Hi @Jacse , maybe you have installed another app that is using the same provider. A quick fix is changing the provider on manifest of react-native-fetch-blob to get the provider of the package name (also remember to change the reference on the code). I will work on it. Thanks!

@Moreno97
Copy link
Author

Moreno97 commented Jan 9, 2018

After some investigation I resolve the error. It's necessary to change the references on the library and add a provider in your app manifest like this:

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
        </provider>

As soon as I can I'll update the PR.

@Jacse
Copy link
Contributor

Jacse commented Jan 11, 2018

Great! Yes, my release and debug versions are two different apps so I can tell the difference 😄

@lll000111
Copy link
Contributor

FYI

react-native-fetch-blob has a new maintained location. Check out the README.

Please consider submitting your PR there, this repository is unmaintained.

@Moreno97
Copy link
Author

@lll000111 Ok! As soon as we can we'll submit the PR there. Thanks!

@pavermakov
Copy link

Are you guys going to merge it?

@lll000111
Copy link
Contributor

@pavermakov Of course not! Read the README.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants