react-native-share / react-native-share

Social share, sending simple data to other apps.
https://react-native-share.github.io/react-native-share
MIT License
3.64k stars 943 forks source link

Share instagram story is not work properly #808

Closed retyui closed 3 years ago

retyui commented 4 years ago

Steps to reproduce

I tried to run the next code:

import Share from 'react-native-share';

const shareToInstagramStoryUnsafe = async () => {
  const shareOptions = {
    backgroundImage:
      'https://hatrabbits.com/wp-content/uploads/2016/12/rare-combinaties.jpg',
    method: Share.InstagramStories.SHARE_BACKGROUND_IMAGE,
    social: Share.Social.INSTAGRAM_STORIES,
  };

  console.log(' --- xdebug shareOptions', shareOptions);

  const ShareResponse = await Share.shareSingle(shareOptions);

  console.log(' --- xdebug ShareResponse', ShareResponse);
};

shareToInstagramStoryUnsafe();

As a result I see next:

D/ViewRootImpl@1618a00[MainActivity]: ViewPostIme pointer 0
D/ViewRootImpl@1618a00[MainActivity]: ViewPostIme pointer 1
I/ReactNativeJS: ' --- xdebug shareOptions', { backgroundImage: 'https://hatrabbits.com/wp-content/uploads/2016/12/rare-combinaties.jpg',
      method: 'shareBackgroundImage',
      social: 'instagramstories' }
I/System.out: SHARE SINGLE METHOD
I/System.out: com.instagram.android
I/System.out: INSTALLED
I/ReactNativeJS: ' --- xdebug ShareResponse', { message: true, app: 'com.instagram.android' }
D/SensorManager: unregisterListener ::   
D/ViewRootImpl@1618a00[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@88a9ff6[MainActivity]
    getNavigationBarColor() -855310
D/ViewRootImpl@1618a00[MainActivity]: stopped(false) old=false
D/SensorManager: registerListener :: 1, LSM6DSO Acceleration Sensor, 66667, 0,  
D/ViewRootImpl@1618a00[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=14 res=0x1 s={true 522197549056} ch=false
D/ViewRootImpl@1618a00[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@88a9ff6[MainActivity]
    getNavigationBarColor() -855310

Expected behavior

Instagram story sharing should work properly

Actual behavior

After invoking .shareSingle(...) will be opened a new activity and very quickly closed and a result { message: true, app: 'com.instagram.android' } Instagram didn't open

Also, I tried to use example/App.js and the same problem:

Environment

react-native-share

Version: 3.5.0

Link to repo (highly encouraged)

https://github.com/

mikehardy commented 4 years ago

Looks like the example implements it, how does the example app work for you?

https://github.com/react-native-community/react-native-share/blob/d62e9e0037de8d0c4e97df1b6b980fb9a7a1191e/example/App.js#L172

retyui commented 4 years ago

3e90a53a-25d1-4b69-a26e-d265c1eb8a05

mikehardy commented 4 years ago

Great! So it is easy to reproduce with code the maintainers have access to, since you didn't include a link to the repo

It's pretty easy to hack System.err.println("ReactNativeJS", "whatever you want to log here") lines into the Java implementation directly in node_modules and trace it through. What did you see as arguments and return values in logcat when you did that and attempted to access the underlying system APIs?

retyui commented 4 years ago

@mikehardy I don't understand what logcat values you want to see?

MateusAndrade commented 4 years ago

@mikehardy I don't understand what logcat values you want to see?

I think @mikehardy means the if you could debug the native side, testing the output on the logcat.

iammuhammadumar commented 4 years ago

Also facing the same issue on android and working fine on IOS.

retyui commented 4 years ago

@MateusAndrade How can help you to show the problem? Given that this problem is reproduced on the example application

MateusAndrade commented 4 years ago

@MateusAndrade How can help you to show the problem? Given that this problem is reproduced on the example application

We would appreciate any help with that, you can try editing the native code directly on ios and android to see how it works.

alicaglayan commented 4 years ago

Same issue..

AndroidManifest.xml

` <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.android.test">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
  android:requestLegacyExternalStorage="true"
  android:name="com.android.test.MainApplication"
  android:label="@string/app_name"
  android:largeHeap="true"
  android:icon="@mipmap/show_launcher"
  android:roundIcon="@mipmap/show_launcher_round"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
    <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="${applicationId}.provider"
        android:grantUriPermissions="true"
        android:exported="false">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/filepaths" />
    </provider>

    <meta-data
        android:name="com.google.android.gms.ads.AD_MANAGER_APP"
        android:value="true"/>

    <!-- Add this SplashActivity -->
    <activity
        android:name="com.android.test.SplashActivity"
        android:theme="@style/SplashTheme"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

  <activity
    android:name="com.android.test.MainActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="adjustResize">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
  </activity>
  <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

`

filepaths.xml

`<?xml version="1.0" encoding="utf-8"?>

` **Logcat** 2020-07-09 15:11:55.979 17376-17463/com.android.test I/System.out: SHARE SINGLE METHOD 2020-07-09 15:11:55.982 17376-17463/com.android.test I/System.out: com.instagram.android 2020-07-09 15:11:55.994 17376-17463/com.android.test I/System.out: INSTALLED **2020-07-09 15:11:56.007 17376-17463/com.android.test W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Download/background.jpg (Permission denied)** 2020-07-09 15:11:56.008 17376-17442/com.android.test D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 14 11 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at java.io.FileOutputStream.open0(Native Method) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at java.io.FileOutputStream.open(FileOutputStream.java:308) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at java.io.FileOutputStream.(FileOutputStream.java:238) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at java.io.FileOutputStream.(FileOutputStream.java:180) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at cl.json.ShareFile.getURI(ShareFile.java:117) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at cl.json.social.ShareIntent.open(ShareIntent.java:146) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at cl.json.social.SingleShareIntent.open(SingleShareIntent.java:40) 2020-07-09 15:11:56.010 17376-17463/com.android.test W/System.err: at cl.json.social.InstagramStoriesShare.open(InstagramStoriesShare.java:27)
retyui commented 4 years ago

@mikehardy @MateusAndrade

During the sharing process (on Adnroid 10) you will see next exceptions:

java.lang.SecurityException: Permission Denial: opening provider cl.json.RNShareFileProvider from ProcessRecord{2fa6f3d 4918:com.instagram.android/u0a260} (pid=4918, uid=10260) that is not exported from UID 10268

java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" 

There is a full logcal output:

Click to expand a logcal output ```java 2020-07-14 12:23:31.831 32544-32544/? D/TouchInteractionService: onInputEvent, ACTION_UP 2020-07-14 12:23:31.849 16741-16877/com.example I/System.out: SHARE SINGLE METHOD 2020-07-14 12:23:31.853 16741-16877/com.example I/System.out: com.instagram.android 2020-07-14 12:23:31.856 16741-16877/com.example I/System.out: INSTALLED 2020-07-14 12:23:31.862 5996-5996/? I/display: HWC setVsyncEnabled = 1 2020-07-14 12:23:31.900 31745-862/? I/ActivityTaskManager: START u0 {act=com.instagram.share.ADD_TO_STORY dat=content://com.example.rnshare.fileprovider/rnshare1/background.jpg typ=image/png flg=0x10000000 pkg=com.instagram.android cmp=com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity} from uid 10268 2020-07-14 12:23:31.901 597-597/? W/adbd: timeout expired while flushing socket, closing 2020-07-14 12:23:31.901 31745-862/? W/system_server: resources.arsc in APK '/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/base.apk' is compressed. 2020-07-14 12:23:31.912 5996-5996/? I/display: HWC setVsyncEnabled = 0 2020-07-14 12:23:31.925 31745-862/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 2623359 uid : 1000 pid : 31745 pkgName : AMS_APP_SWITCH@CPU_MIN@38 2020-07-14 12:23:31.927 31745-862/? D/ActivityManagerPerformance: AMP_acquire() APP_SWITCH 2020-07-14 12:23:31.927 31745-862/? D/ActivityTaskManager: MultiTaskingTaskLaunchParamsModifier:task=null display-id=0 display-windowing-mode=1 2020-07-14 12:23:31.927 31745-862/? D/ActivityTaskManager: MultiTaskingTaskLaunchParamsModifier:task=null display-id=0 display-windowing-mode=1 non-freeform-display maximized-bounds 2020-07-14 12:23:31.927 905-905/? D/ra: limitGPUFreq:: freq = -1 2020-07-14 12:23:31.927 905-905/? D/ra: limitCPUFreq:: freq = -1 2020-07-14 12:23:31.927 31745-5883/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MAX_LIMIT frequency : 1791562 uid : 1000 pid : 31745 tag : SIOP_ARM_MAX@3 2020-07-14 12:23:31.928 31745-862/? I/android_os_HwBinder: HwBinder: Starting thread pool for getting: vendor.samsung_slsi.hardware.epic@1.0::IEpicRequest/default 2020-07-14 12:23:31.929 6033-7409/? I/SurfaceFlinger: id=2782 createSurf (0x0),-1 flag=80004, Stack=6#0 2020-07-14 12:23:31.930 6033-6153/? I/SurfaceFlinger: id=2783 createSurf (0x0),-1 flag=20004, animation background stackId=6#0 2020-07-14 12:23:31.930 31745-862/? D/ActivityTaskManager: MultiTaskingTaskLaunchParamsModifier:tid=2822 display-from-task=0 display-id=0 display-windowing-mode=1 non-freeform-display maximized-bounds 2020-07-14 12:23:31.930 6033-6153/? I/SurfaceFlinger: id=2784 createSurf (0x0),-1 flag=80004, Task=2822#0 2020-07-14 12:23:31.930 31745-862/? D/ActivityTaskManager: updateMinimizedState: unknown notifyReason=2 2020-07-14 12:23:31.931 6033-6153/? I/SurfaceFlinger: id=2785 createSurf (0x0),-1 flag=80004, AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}}#0 2020-07-14 12:23:31.933 31745-862/? I/ActivityTaskManager: Launch time is true 2020-07-14 12:23:31.933 31745-862/? I/ActivityTaskManager: mTimer start at this point for Notification solution 2020-07-14 12:23:31.933 31745-862/? I/ActivityTaskManager: mTimer scheduling done 2020-07-14 12:23:31.933 31745-862/? D/SensorService: removeConnection, index : 0, size : 2 2020-07-14 12:23:31.933 31745-862/? D/SensorService: # removeConnection, index : 0, size : 1 2020-07-14 12:23:31.934 31745-862/? D/SensorService: Calling activate off 1 2020-07-14 12:23:31.934 6002-6478/? I/Sensors: batch(0) - accelerometer_sensor try to batching with 66667000 2020-07-14 12:23:31.934 31745-31767/? D/MdnieScenarioControlService: MultiWindowState : false , mode : 0 2020-07-14 12:23:31.934 31745-5883/? D/SettingsProvider: isChangeAllowed() : name = reminder_exp_learning_time_elapsed 2020-07-14 12:23:31.934 31745-31767/? D/GameManagerService: MultiWindowEventListener.onFocusStackChanged(), state=0, top=ComponentInfo{com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity} 2020-07-14 12:23:31.934 31745-5883/? D/SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy3 2020-07-14 12:23:31.935 31745-5883/? D/SettingsProvider: projectionArgs: isSettingsChangesAllowed 2020-07-14 12:23:31.935 31745-5883/? D/SettingsProvider: selectionArgs: false 2020-07-14 12:23:31.935 31745-5883/? D/SettingsProvider: selectionArgs: 10054 2020-07-14 12:23:31.935 31745-31767/? D/GameSDKService: MultiWindowEventListener.onFocusStackChanged(), state=0, top=ComponentInfo{com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity} 2020-07-14 12:23:31.935 31745-32026/? D/GameManagerService: handleForegroundChange(). pkgName: com.instagram.android, clsName: com.instagram.share.handleractivity.CustomStoryShareHandlerActivity,FgActivityName:com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity,userID:0 2020-07-14 12:23:31.935 31745-32026/? D/GameManagerService: handleForegroundChange(). set mFgApp: com.instagram.android 2020-07-14 12:23:31.935 31745-32026/? D/GameManagerService: notifyResumePause(). pkg: com.instagram.android, type: 4, isMinimized: false, isTunableApp: false 2020-07-14 12:23:31.935 31745-32026/? D/GameManagerService: notifyResumePause(). unexpected mPrevNotiType: -1 2020-07-14 12:23:31.935 31745-5883/? D/SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed 2020-07-14 12:23:31.935 31745-5883/? D/SecContentProvider: called from android.uid.systemui:10054 2020-07-14 12:23:31.935 31745-5883/? D/RestrictionPolicy: isSettingsChangesAllowedAsUser, userId 0 : true 2020-07-14 12:23:31.935 31745-5883/? D/SettingsProvider: ret = 1 2020-07-14 12:23:31.936 16741-16741/com.example D/SensorManager: unregisterListener :: 2020-07-14 12:23:31.936 31745-31768/? E/system_server: Invalid ID 0x00000000. 2020-07-14 12:23:31.937 31745-31767/? D/GameSDKService: MultiWindowEventListener.onFocusStackChanged(): com.instagram.android 2020-07-14 12:23:31.937 31745-31745/? V/SettingsProvider: Notifying for 0: content://settings/secure/reminder_exp_learning_time_elapsed 2020-07-14 12:23:31.940 31745-6996/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.940 31745-6996/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.940 31745-6996/? V/WindowManager: rotationForOrientation(orient=-1, last=0); user=0 USER_ROTATION_LOCKED 2020-07-14 12:23:31.940 31745-6996/? V/WindowOrientationListener: getProposedRotation :-1 2020-07-14 12:23:31.940 31745-6996/? V/WindowManager: Computed rotation=0 for display id=0 based on lastOrientation=-1 and oldRotation=0, caller=com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1496 com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1450 com.android.server.wm.RootActivityContainer.ensureVisibilityAndConfig:681 com.android.server.wm.ActivityStackSupervisor.realStartActivityLocked:976 com.android.server.wm.ActivityStackSupervisor.startSpecificActivityLocked:1263 com.android.server.wm.ActivityStack.resumeTopActivityInnerLocked:3578 2020-07-14 12:23:31.940 31745-6996/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.940 31745-6996/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.941 31745-6996/? D/GamePkgDataHelper: notifyAppCreate(), pkgName: com.instagram.android, sendRet: true 2020-07-14 12:23:31.941 31745-6996/? D/ActivityTaskManager_ZLA: realStartActivityLocked Getting null 2020-07-14 12:23:31.941 31745-32026/? D/GamePkgDataHelper: getGamePkgData(). com.instagram.android 2020-07-14 12:23:31.941 31745-32026/? D/GameManagerService: handleMessage(), MSG_APP_CREATE. ignore. pkgName: com.instagram.android 2020-07-14 12:23:31.941 4918-4918/? W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@bb5b803 2020-07-14 12:23:31.941 31745-6996/? D/InputDispatcher: Focused application set to (0): a106eb0 2020-07-14 12:23:31.941 31745-6996/? V/WindowManager: Changing focus from Window{c007feb u0 com.example/com.example.MainActivity} to null displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:202 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6269 com.android.server.wm.ActivityDisplay.setFocusedApp:1543 com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:6830 com.android.server.wm.ActivityStack.onActivityStateChanged:648 com.android.server.wm.TaskRecord.onActivityStateChanged:2248 2020-07-14 12:23:31.942 31745-6996/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.942 31745-6996/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.instagram.android, userId = 0 2020-07-14 12:23:31.956 31745-31768/? D/InputTransport: Input channel constructed: 'c91623c', fd=552 2020-07-14 12:23:31.956 31745-31768/? D/InputTransport: Input channel constructed: 'c91623c', fd=625 2020-07-14 12:23:31.957 6033-7409/? I/SurfaceFlinger: id=2786 createSurf (0x0),-1 flag=80004, c91623c Splash Screen com.instagram.android#0 2020-07-14 12:23:31.957 31745-31768/? D/ViewRootImpl@1f7765b[android]: setView = com.android.internal.policy.DecorView@babdf41 TM=true MM=false 2020-07-14 12:23:31.959 31745-31768/? V/WindowManager: Relayout Window{c91623c u0 Splash Screen com.instagram.android}: viewVisibility=0 req=1080x2400 2020-07-14 12:23:31.961 6033-7409/? I/SurfaceFlinger: id=2787 createSurf (1080x2400),1 flag=404, Splash Screen com.instagram.android#0 2020-07-14 12:23:31.962 31745-31768/? D/WindowManager: makeSurface duration=0 name=Splash Screen com.instagram.android 2020-07-14 12:23:31.963 31745-31768/? V/WindowManager: Relayout 31745: mAttrs={(0,0)(fillxfill) sim={adjust=pan} ty=APPLICATION_STARTING wanim=0x1030305 fl=81830118 pfl=10020011 vsysui=10 naviIconColor=0} 2020-07-14 12:23:31.963 31745-31768/? D/ViewRootImpl@1f7765b[android]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=4 res=0x7 s={true 487172644864} ch=true 2020-07-14 12:23:31.963 31745-31781/? D/FastTrack: setFastTrackState: pid = 4918 ;tid= 4918 ;value= 1 2020-07-14 12:23:31.965 31745-31765/? D/CodecSolution: isMaxAspectPackageEx: com.instagram.android : false(0) 2020-07-14 12:23:31.965 31745-31765/? I/PerfSDKService: Current foregroundpackage name : com.instagram.android 2020-07-14 12:23:31.966 31745-31768/? E/DecorView: mWindow.mActivityCurrentConfig is null 2020-07-14 12:23:31.967 31745-31767/? I/WindowManager: Focus moving from Window{c007feb u0 com.example/com.example.MainActivity} to null displayId=0 2020-07-14 12:23:31.967 31745-31767/? I/WindowManager: Losing focus: Window{c007feb u0 com.example/com.example.MainActivity} 2020-07-14 12:23:31.968 31745-31971/? D/PkgPredictorService: com.instagram.android go to foreground! 2020-07-14 12:23:31.969 16741-16741/com.example D/ViewRootImpl@8cfb52[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1 2020-07-14 12:23:31.969 16741-16741/com.example D/InputMethodManager: prepareNavigationBarInfo() DecorView@af886fa[MainActivity] 2020-07-14 12:23:31.969 16741-16741/com.example D/InputMethodManager: getNavigationBarColor() -855310 2020-07-14 12:23:31.969 31745-31971/? D/PkgPredictorService: previous pkgs: com.example,com.example,com.example running pkg: com.instagram.android, uid: 0 is system: false 2020-07-14 12:23:31.969 31745-31971/? D/PkgPredictorService-Collector: save record... (hour:12 day:3 previous:[com.example, com.example, com.example] activityName:unknown running:com.instagram.android userId:0 screenOrientation:0 wifi:1 bt:1 predictTime:2 apkVersion:149.0.0.25.120 consumeTime:-1 preloaded:false>) 2020-07-14 12:23:31.969 31745-31971/? D/PkgPredictorService-NapPreloadController: User using: com.instagram.android 2020-07-14 12:23:31.969 31745-31767/? D/GameManagerService: noteResumeComponent(), resumeComponent: com.instagram.android 2020-07-14 12:23:31.969 31745-32026/? D/GameManagerService: handleForegroundChange(). pkgName: com.instagram.android, clsName: com.instagram.share.handleractivity.CustomStoryShareHandlerActivity,FgActivityName:com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity,userID:0 2020-07-14 12:23:31.969 31745-32026/? D/GameManagerService: handleForegroundChange(). same package. game has never resumed yet. ignore 2020-07-14 12:23:31.970 31745-31768/? D/WindowManager: finishDrawingWindow: Window{c91623c u0 Splash Screen com.instagram.android} mDrawState=DRAW_PENDING 2020-07-14 12:23:31.970 31745-31971/? I/PkgPredictorService-NapClassifier: RF predict version:0 2020-07-14 12:23:31.970 31745-862/? D/GamePkgDataHelper: getSosPolicy(). com.instagram.android 2020-07-14 12:23:31.970 31745-31971/? I/RandomForest: predict15: {85.0=7, 45.0=92, 113.0=1} 2020-07-14 12:23:31.970 31745-6378/? D/InputDispatcher: Focus left window (16741): c007feb in display 0 0 2020-07-14 12:23:31.970 31745-31971/? I/RandomForest: Labels: 45.0,85.0,113.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0, 2020-07-14 12:23:31.971 31745-31971/? D/PkgPredictorService-NapClassifier: Predict result: 45.0,85.0,113.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0, - [0_&_org.telegram.messenger, 0_&_com.spotify.music, 0_&_net.oneplus.weather] 2020-07-14 12:23:31.971 31745-31971/? D/PkgPredictorService-NapPreloadController: preloadWithUid pkg: [org.telegram.messenger] Uid: [0] 2020-07-14 12:23:31.972 31745-31768/? V/WindowManager: performShow on Window{c91623c u0 Splash Screen com.instagram.android}: mDrawState=READY_TO_SHOW readyForDisplay=false starting=true during animation: policyVis=true parentHidden=false tok.hiddenRequested=false tok.hidden=true animating=true tok animating=true Callers=com.android.server.wm.WindowState.performShowLocked:4686 com.android.server.wm.WindowStateAnimator.commitFinishDrawingLocked:371 com.android.server.wm.DisplayContent.lambda$new$8$DisplayContent:980 com.android.server.wm.-$$Lambda$DisplayContent$qxt4izS31fb0LF2uo_OF9DMa7gc.accept:4 2020-07-14 12:23:31.972 31745-31772/? I/SysIntService: getSysStatService entry 2020-07-14 12:23:31.973 4918-5004/? W/MultiSignalANRDetectorAcra: Resuming error state checks 2020-07-14 12:23:31.973 16741-16741/com.example D/EmergencyMode: [EmergencyManager] android createPackageContext successful 2020-07-14 12:23:31.973 31745-31745/? I/SamsungAlarmManager: setLocked to kernel - T:2 / 20200714T122346, SetElapsed=8687566, nowELAPSED=8673457 2020-07-14 12:23:31.974 31745-31768/? I/WindowManager: Reparenting to leash, surface=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be 2020-07-14 12:23:31.974 31745-31745/? I/SamsungAlarmManager: setLocked to kernel - T:3 / 20200714T122334, SetElapsed=8676005, nowELAPSED=8673458 2020-07-14 12:23:31.974 6033-7411/? I/SurfaceFlinger: id=2788 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#0 2020-07-14 12:23:31.974 31745-31768/? D/WindowManager: makeSurface duration=1 leash=Surface(name=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash)/@0xf11aafc 2020-07-14 12:23:31.975 6033-7411/? I/SurfaceFlinger: id=2789 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-bounds#0 2020-07-14 12:23:31.975 31745-31768/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.975 31500-32116/? I/netd: firewallSetUidRule(2, 10260, 1) <0.03ms> 2020-07-14 12:23:31.976 31745-31768/? I/WindowManager: Reparenting to leash, surface=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 2020-07-14 12:23:31.976 6033-7411/? I/SurfaceFlinger: id=2790 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#0 2020-07-14 12:23:31.976 31745-31768/? D/WindowManager: makeSurface duration=0 leash=Surface(name=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash)/@0xc51bf00 2020-07-14 12:23:31.976 6033-7409/? I/SurfaceFlinger: id=2791 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#0 2020-07-14 12:23:31.977 31745-31768/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:31.983 31745-31765/? D/SIProcessListener: PID is 4918 State is 1 2020-07-14 12:23:31.983 31745-31961/? D/SICompactionHandler: pid:4918 not present in whitelist 2020-07-14 12:23:31.984 6033-6033/? I/Layer: id=2792[0] Destroyed Screenshot Parent 2020-07-14 12:23:31.987 31745-31767/? D/GamePkgDataHelper: getSosPolicy(). com.instagram.android 2020-07-14 12:23:31.987 31745-31767/? D/GameManagerService: identifyGamePackage. com.instagram.android, mCurrentUserId: 0, callerUserId: 0 2020-07-14 12:23:31.987 31745-31767/? D/GamePkgDataHelper: getGamePkgData(). com.instagram.android 2020-07-14 12:23:31.988 31498-32035/? I/CameraService: UidPolicy: onUidActive, uid = 10260 2020-07-14 12:23:31.988 31498-32035/? I/CameraService: onUidStateChanged: uid=10260, procState=2 2020-07-14 12:23:31.988 31498-32035/? I/CameraService: notifyMonitoredUids 2020-07-14 12:23:31.988 31745-31768/? D/ViewRootImpl@1f7765b[android]: MSG_RESIZED: frame=(0,0,1080,2400) ci=(0,74,0,0) vi=(0,74,0,0) or=1 2020-07-14 12:23:31.991 31745-31765/? D/WindowManager: setSystemUiVisibility: displayId=0, vis=0x8018, fullVis=0x0, dockVis=0x0, win=Window{c91623c u0 Splash Screen com.instagram.android} 2020-07-14 12:23:31.992 4918-4918/? I/MultiWindowDecorSupport: updateCaptionType >> DecorView@bff0af1[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true 2020-07-14 12:23:31.992 4918-4918/? D/MultiWindowDecorSupport: setCaptionType = 0, DecorView = DecorView@bff0af1[] 2020-07-14 12:23:31.992 31745-6378/? W/ActivityManager: Permission Denial: opening provider cl.json.RNShareFileProvider from ProcessRecord{2fa6f3d 4918:com.instagram.android/u0a260} (pid=4918, uid=10260) that is not exported from UID 10268 2020-07-14 12:23:31.993 4918-7874/? E/StoryShareMediator: Exception in ExternalMediaImportCallable java.lang.SecurityException: Permission Denial: opening provider cl.json.RNShareFileProvider from ProcessRecord{2fa6f3d 4918:com.instagram.android/u0a260} (pid=4918, uid=10260) that is not exported from UID 10268 at android.os.Parcel.createException(Parcel.java:2088) at android.os.Parcel.readException(Parcel.java:2056) at android.os.Parcel.readException(Parcel.java:2004) at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5864) at android.app.ActivityThread.acquireProvider(ActivityThread.java:7191) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2895) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2124) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1678) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1510) at android.content.ContentResolver.openInputStream(ContentResolver.java:1194) at X.8v6.A00(:8) at X.8v7.A00(:12) at X.8v8.run(:28) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) at X.0Nr.run(:5) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ActivityManagerService.getContentProviderImpl(ActivityManagerService.java:8392) at com.android.server.am.ActivityManagerService.getContentProviderImpl(ActivityManagerService.java:8238) at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:8879) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2461) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3376) 2020-07-14 12:23:31.997 31745-32022/? D/ConnectivityService: filterNetworkStateForUid() uid: 10260, pid: 4918 2020-07-14 12:23:31.997 31745-32022/? D/ConnectivityService: filterNetworkStateForUid() uid: 10260, pid: 4918, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false] 2020-07-14 12:23:31.997 31745-32218/? D/ConnectivityService: filterNetworkStateForUid() uid: 10260, pid: 4918 2020-07-14 12:23:31.997 31745-32022/? D/ConnectivityService: Returning UNBLOCKED NetworkInfo to uid=10260 2020-07-14 12:23:31.997 31745-32218/? D/ConnectivityService: filterNetworkStateForUid() uid: 10260, pid: 4918, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false] 2020-07-14 12:23:31.998 31745-31745/? I/SamsungAlarmManager: setLocked to kernel - T:2 / 20200714T122346, SetElapsed=8687566, nowELAPSED=8673481 2020-07-14 12:23:31.998 31745-31745/? D/SamsungAlarmManager: setInexact Listener (T:3/F:0/AC:false) 20200714T122405 - CU:1000/CP:31745 2020-07-14 12:23:31.998 905-1110/? D/ra: limitGPUFreq:: freq = -1 2020-07-14 12:23:31.998 905-1110/? D/ra: limitCPUFreq:: freq = -1 2020-07-14 12:23:31.999 31745-31745/? I/SamsungAlarmManager: setLocked to kernel - T:2 / 20200714T122346, SetElapsed=8687566, nowELAPSED=8673482 2020-07-14 12:23:31.999 905-1110/? D/SDHMS:r: writeSysfs:: path = /sys/power/execution_mode_change, value = 0 2020-07-14 12:23:32.000 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageWhitelisted:com.instagram.android user:0 2020-07-14 12:23:32.000 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageWhitelisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.000 31745-31745/? D/ActivityManager: package com.instagram.android, user - 0 is SDcard whitelisted 2020-07-14 12:23:32.000 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.instagram.android user:0 2020-07-14 12:23:32.000 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageBlacklisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.000 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.instagram.android user:0 2020-07-14 12:23:32.000 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageBlacklisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.004 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageWhitelisted:com.samsung.sait.sohservice user:0 2020-07-14 12:23:32.004 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageWhitelisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.004 31745-31745/? D/ActivityManager: package com.samsung.sait.sohservice, user - 0 is SDcard whitelisted 2020-07-14 12:23:32.004 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.samsung.sait.sohservice user:0 2020-07-14 12:23:32.004 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageBlacklisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.004 31745-31745/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.samsung.sait.sohservice user:0 2020-07-14 12:23:32.004 31745-31745/? D/ApplicationPolicy: isApplicationExternalStorageBlacklisted: DO is not enabled on user 0. Allowed. 2020-07-14 12:23:32.004 31745-889/? D/PackageManager: setEnabledSetting : userId = 0 packageName = com.instagram.android cmp = com.instagram.push.fbns.FbnsInitBroadcastReceiver newState = 1 callingPackage = 10260/com.instagram.android 2020-07-14 12:23:32.006 31745-31745/? D/BaseRestrictionMgr: Package: com.sec.android.app.samsungapps, userid: 0, hostingType: bindService is allowed by freecess, caller is: android 2020-07-14 12:23:32.009 31498-31498/? I/CameraService: onUidStateChanged: uid=10086, procState=9 2020-07-14 12:23:32.009 31745-941/? D/BaseRestrictionMgr: Package: com.facebook.services, userid: 0, hostingType: startService is allowed by freecess, caller is: com.instagram.android 2020-07-14 12:23:32.012 17496-17496/? D/[SAUI]: PollJobService::1203004 2020-07-14 12:23:32.012 31745-31781/? D/FastTrack: setFastTrackState: pid = 4918 ;tid= 17650 ;value= 1 2020-07-14 12:23:32.014 31745-6996/? D/InputTransport: Input channel constructed: '7ead9a7', fd=628 2020-07-14 12:23:32.014 31745-6996/? D/InputTransport: Input channel constructed: '7ead9a7', fd=629 2020-07-14 12:23:32.014 6033-6158/? I/SurfaceFlinger: id=2793 createSurf (0x0),-1 flag=80004, 7ead9a7 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity#0 2020-07-14 12:23:32.015 31745-6996/? D/InputTransport: Input channel destroyed: '7ead9a7', fd=629 2020-07-14 12:23:32.016 4918-4918/? D/ViewRootImpl@3b7d04f[CustomStoryShareHandlerActivity]: setView = com.android.internal.policy.DecorView@bff0af1 TM=true MM=false 2020-07-14 12:23:32.017 31745-6378/? D/ActivityTaskManager: updateMinimizedState: unknown notifyReason=2 2020-07-14 12:23:32.018 31745-6378/? D/InputDispatcher: Focused application set to (0): f85488d 2020-07-14 12:23:32.018 31745-6378/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.019 31745-6378/? I/ActivityTaskManager: Remove from unknown app 2020-07-14 12:23:32.020 31745-31767/? D/MdnieScenarioControlService: MultiWindowState : false , mode : 0 2020-07-14 12:23:32.021 31745-889/? V/WindowManager: Relayout Window{7ead9a7 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity}: viewVisibility=0 req=1080x2400 2020-07-14 12:23:32.022 6033-6158/? I/SurfaceFlinger: id=2794 createSurf (1080x2400),1 flag=404, com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918#0 2020-07-14 12:23:32.023 31745-889/? D/WindowManager: makeSurface duration=1 name=com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918 2020-07-14 12:23:32.024 31745-31767/? D/GameManagerService: MultiWindowEventListener.onFocusStackChanged(), state=0, top=ComponentInfo{com.example/com.example.MainActivity} 2020-07-14 12:23:32.024 31745-31767/? D/GameSDKService: MultiWindowEventListener.onFocusStackChanged(), state=0, top=ComponentInfo{com.example/com.example.MainActivity} 2020-07-14 12:23:32.024 31745-32026/? D/GameManagerService: handleForegroundChange(). pkgName: com.example, clsName: com.example.MainActivity,FgActivityName:com.example/.MainActivity,userID:0 2020-07-14 12:23:32.024 31745-32026/? D/GameManagerService: handleForegroundChange(). set mFgApp: com.example 2020-07-14 12:23:32.024 31745-889/? V/WindowManager: Relayout 4918: mAttrs={(0,0)(fillxfill) sim={adjust=pan forwardNavigation} ty=BASE_APPLICATION wanim=0x1030305 fl=81810100 pfl=10020000 vsysui=10 naviIconColor=0} 2020-07-14 12:23:32.024 31745-32026/? D/GameManagerService: notifyResumePause(). pkg: com.example, type: 4, isMinimized: false, isTunableApp: false 2020-07-14 12:23:32.024 31745-32026/? D/GameManagerService: notifyResumePause(). unexpected mPrevNotiType: -1 2020-07-14 12:23:32.024 4918-4918/? D/ViewRootImpl@3b7d04f[CustomStoryShareHandlerActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=4 res=0x7 s={true 489924874240} ch=true 2020-07-14 12:23:32.024 4918-17650/? D/OpenGLRenderer: createReliableSurface : 0x71831d6e40(0x7211cc5000) 2020-07-14 12:23:32.026 4918-17650/? D/OpenGLRenderer: makeCurrent EglSurface : 0x0 -> 0x0 2020-07-14 12:23:32.026 31494-31494/? D/Zygote: Forked child process 17658 2020-07-14 12:23:32.029 17658-17658/? E/Zygote: isWhitelistProcess - Process is Whitelisted 2020-07-14 12:23:32.029 17658-17658/? E/Zygote: accessInfo : 1 2020-07-14 12:23:32.030 4918-17650/? I/mali_winsys: new_window_surface() [1080x2400] return: 0x3000 2020-07-14 12:23:32.031 4918-17650/? D/OpenGLRenderer: makeCurrent EglSurface : 0x0 -> 0x71039cf500 2020-07-14 12:23:32.032 5593-5593/? I/hwservicemanager: getTransport: Cannot find entry android.hardware.graphics.mapper@3.0::IMapper/default in either framework or device manifest. 2020-07-14 12:23:32.032 4918-17650/? W/Gralloc3: mapper 3.x is not supported 2020-07-14 12:23:32.034 4918-17650/? I/gralloc: Arm Module v1.0 2020-07-14 12:23:32.033 31745-889/? D/ConnectivityService: filterNetworkStateForUid() uid: 10077, pid: 8589 2020-07-14 12:23:32.034 31745-889/? D/ConnectivityService: filterNetworkStateForUid() uid: 10077, pid: 8589, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false] 2020-07-14 12:23:32.035 31745-31767/? D/GameSDKService: MultiWindowEventListener.onFocusStackChanged(): com.example 2020-07-14 12:23:32.037 31498-31498/? I/CameraService: onUidStateChanged: uid=10086, procState=11 2020-07-14 12:23:32.037 31745-889/? D/ConnectivityService: filterNetworkStateForUid() uid: 10077, pid: 8589 2020-07-14 12:23:32.037 31745-889/? D/ConnectivityService: filterNetworkStateForUid() uid: 10077, pid: 8589, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false] 2020-07-14 12:23:32.038 31745-31857/? I/SensorService: [REARLIGHT] lux value : 229, code value : 147 2020-07-14 12:23:32.043 31745-6996/? D/WindowManager: finishDrawingWindow: Window{7ead9a7 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity} mDrawState=DRAW_PENDING 2020-07-14 12:23:32.043 31498-31498/? I/CameraService: UidPolicy: onUidActive, uid = 10077 2020-07-14 12:23:32.043 31498-31498/? I/CameraService: onUidStateChanged: uid=10077, procState=4 2020-07-14 12:23:32.044 31745-31768/? D/PkgPredictorService: pkg:com.instagram.android activity:com.instagram.share.handleractivity.CustomStoryShareHandlerActivity thisTime:-1 2020-07-14 12:23:32.044 31745-31768/? D/PkgPredictorService-Collector: update activity launch time: CustomStoryShareHandlerActivity : -1 2020-07-14 12:23:32.045 31745-31768/? D/ViewRootImpl@1f7765b[android]: dispatchDetachedFromWindow 2020-07-14 12:23:32.046 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.046 31745-32301/? V/WindowManager: rotationForOrientation(orient=-1, last=0); user=0 USER_ROTATION_LOCKED 2020-07-14 12:23:32.046 31745-32301/? V/WindowOrientationListener: getProposedRotation :-1 2020-07-14 12:23:32.046 31745-32301/? V/WindowManager: Computed rotation=0 for display id=0 based on lastOrientation=-1 and oldRotation=0, caller=com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1496 com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1450 com.android.server.wm.RootActivityContainer.ensureVisibilityAndConfig:681 com.android.server.wm.ActivityStack.finishCurrentActivityLocked:4811 com.android.server.wm.ActivityStack.completePauseLocked:2181 com.android.server.wm.ActivityStack.activityPausedLocked:2147 2020-07-14 12:23:32.046 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.047 31745-31774/? I/ActivityManager: Start proc 17658:com.instagram.android:fwkstartlog/u0a260 for service {com.instagram.android/com.facebook.analytics.appstatelogger.AppStateIntentService} 2020-07-14 12:23:32.047 31745-32301/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 2623359 uid : 1000 pid : 31745 pkgName : AMS_APP_SWITCH@CPU_MIN@38 2020-07-14 12:23:32.048 31745-32301/? D/ActivityManagerPerformance: AMP_acquire() APP_SWITCH 2020-07-14 12:23:32.048 31745-32301/? V/WindowManager: rotationForOrientation(orient=-1, last=0); user=0 USER_ROTATION_LOCKED 2020-07-14 12:23:32.048 31745-32301/? V/WindowOrientationListener: getProposedRotation :-1 2020-07-14 12:23:32.048 31745-32301/? V/WindowManager: Computed rotation=0 for display id=0 based on lastOrientation=-1 and oldRotation=0, caller=com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1496 com.android.server.wm.DisplayContent.updateOrientationFromAppTokens:1450 com.android.server.wm.RootActivityContainer.ensureVisibilityAndConfig:681 com.android.server.wm.ActivityStack.resumeTopActivityInnerLocked:3466 com.android.server.wm.ActivityStack.resumeTopActivityUncheckedLocked:3012 com.android.server.wm.ActivityRecord.makeActiveIfNeeded:2394 2020-07-14 12:23:32.048 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.049 17496-17496/? E/[SAUI]: Firebase initialize is success 2020-07-14 12:23:32.049 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.049 31745-32301/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.example, userId = 0 2020-07-14 12:23:32.049 16741-16741/com.example D/ViewRootImpl@8cfb52[MainActivity]: stopped(false) old=false 2020-07-14 12:23:32.050 31745-889/? D/SensorService: Calling batch handle==1 flags=0 rate=66667000 timeout== 0 2020-07-14 12:23:32.051 17496-17496/? D/PreloadUpdateManagerStateMachine: execute::IDLE:EXECUTE 2020-07-14 12:23:32.051 17496-17496/? D/PreloadUpdateManagerStateMachine: exit::IDLE 2020-07-14 12:23:32.051 17496-17496/? D/PreloadUpdateManagerStateMachine: entry::CHECK_TIMEOUT_FOR_UPDATE 2020-07-14 12:23:32.051 31745-32301/? I/WindowManager: Cancelling animation restarting=true, leash=Surface(name=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash)/@0xc51bf00 2020-07-14 12:23:32.051 31745-32301/? I/WindowManager: Reparenting to original parent: Surface(name=Task=2822)/@0x61a346d, destroyLeash=false, surface=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 2020-07-14 12:23:32.052 31745-32301/? I/WindowManager: Reparenting to leash, surface=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 2020-07-14 12:23:32.052 17658-17658/? E/oid:fwkstartlo: Not starting debugger since process cannot load the jdwp agent. 2020-07-14 12:23:32.052 6033-6153/? I/SurfaceFlinger: id=2795 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#1 2020-07-14 12:23:32.052 31745-32301/? D/WindowManager: makeSurface duration=0 leash=Surface(name=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash)/@0xf1f2933 2020-07-14 12:23:32.052 6033-6153/? I/SurfaceFlinger: id=2796 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#1 2020-07-14 12:23:32.053 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.053 31745-32301/? I/WindowManager: Cancelling animation restarting=true, leash=Surface(name=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash)/@0xf11aafc 2020-07-14 12:23:32.053 31745-32301/? I/WindowManager: Reparenting to original parent: Surface(name=Task=2821)/@0x6872495, destroyLeash=false, surface=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be 2020-07-14 12:23:32.054 16741-16741/com.example D/SensorManager: registerListener :: 1, LSM6DSO Acceleration Sensor, 66667, 0, 2020-07-14 12:23:32.055 31745-32301/? I/WindowManager: Reparenting to leash, surface=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be 2020-07-14 12:23:32.055 6033-6153/? I/SurfaceFlinger: id=2797 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#1 2020-07-14 12:23:32.055 31745-32301/? D/WindowManager: makeSurface duration=0 leash=Surface(name=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash)/@0x30c8bab 2020-07-14 12:23:32.055 6033-6550/? I/SurfaceFlinger: id=2798 createSurf (0x0),-1 flag=80004, Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-bounds#1 2020-07-14 12:23:32.056 31745-32301/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.056 31745-31765/? D/WindowManager: setSystemUiVisibility: displayId=0, vis=0x8018, fullVis=0x0, dockVis=0x0, win=Window{c007feb u0 com.example/com.example.MainActivity} 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2789 removeFromCurrentState Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-bounds#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2788 removeFromCurrentState Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2790 removeFromCurrentState Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2791 removeFromCurrentState Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2790 removeFromCurrentState Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/Layer: id=2788 removeFromCurrentState Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#0 (67) 2020-07-14 12:23:32.057 17496-17496/? D/[SAUI]: AutoUpdateTriggerManager:IDLE:notifyNextTime 2020-07-14 12:23:32.057 17496-17496/? D/PreloadUpdateManagerStateMachine: execute::CHECK_TIMEOUT_FOR_UPDATE:NO_TIMED_OUT 2020-07-14 12:23:32.057 31745-31768/? D/InputTransport: Input channel destroyed: 'c91623c', fd=552 2020-07-14 12:23:32.057 17658-17658/? D/ActivityThread: setConscryptValidator 2020-07-14 12:23:32.057 17658-17658/? D/ActivityThread: setConscryptValidator - put 2020-07-14 12:23:32.057 4918-4918/? D/ViewRootImpl@3b7d04f[CustomStoryShareHandlerActivity]: stopped(true) old=false 2020-07-14 12:23:32.057 4918-17650/? D/OpenGLRenderer: makeCurrent EglSurface : 0x71039cf500 -> 0x0 2020-07-14 12:23:32.057 6033-6158/? I/SurfaceFlinger: id=2789 Removed Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-bounds#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/SurfaceFlinger: id=2791 Removed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#0 (67) 2020-07-14 12:23:32.057 6033-6158/? I/SurfaceFlinger: id=2790 Removed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#0 (67) 2020-07-14 12:23:32.057 31745-31768/? V/WindowManager: Changing focus from null to Window{c007feb u0 com.example/com.example.MainActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:202 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6269 com.android.server.wm.WindowState.setupWindowForRemoveOnExit:2459 com.android.server.wm.WindowState.removeIfPossible:2428 com.android.server.wm.WindowState.removeIfPossible:2315 com.android.server.wm.WindowManagerService.removeWindow:2042 2020-07-14 12:23:32.057 31745-31768/? D/StatusBarManagerService: notifyRequestedSystemKey recent=false home=false 2020-07-14 12:23:32.058 4918-5004/? W/MultiSignalANRDetectorAcra: Moving to background 2020-07-14 12:23:32.058 31745-31768/? D/InputTransport: Input channel destroyed: 'c91623c', fd=625 2020-07-14 12:23:32.059 4918-17650/? D/OpenGLRenderer: destroyEglSurface : 0x71039cf500 2020-07-14 12:23:32.059 4918-17650/? I/mali_egl: eglDestroySurface() in 2020-07-14 12:23:32.061 6033-6033/? I/Layer: id=2789[1] Destroyed Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-bounds#0 2020-07-14 12:23:32.061 6033-6033/? I/Layer: id=2791[1] Destroyed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#0 2020-07-14 12:23:32.061 6033-6033/? I/Layer: id=2790[1] Destroyed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#0 2020-07-14 12:23:32.061 6033-7409/? I/SurfaceFlinger: id=2788 Removed Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#0 (64) 2020-07-14 12:23:32.062 4918-17650/? I/mali_winsys: delete_surface() [1080x2400] return 2020-07-14 12:23:32.062 4918-17650/? I/mali_egl: eglDestroySurface() out 2020-07-14 12:23:32.062 6033-6158/? E/BufferQueueProducer: [com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918#0] disconnect: not connected (req=1) 2020-07-14 12:23:32.062 17496-17496/? D/PreloadUpdateManagerStateMachine: exit::CHECK_TIMEOUT_FOR_UPDATE 2020-07-14 12:23:32.062 4918-17650/? W/libEGL: EGLNativeWindowType 0x71831d6e50 disconnect failed 2020-07-14 12:23:32.062 4918-17650/? D/OpenGLRenderer: ~ReliableSurface : 0x71831d6e40 2020-07-14 12:23:32.062 17496-17496/? D/PreloadUpdateManagerStateMachine: entry::IDLE 2020-07-14 12:23:32.062 4918-4918/? D/ViewRootImpl@3b7d04f[CustomStoryShareHandlerActivity]: dispatchDetachedFromWindow 2020-07-14 12:23:32.063 31745-32301/? D/InputTransport: Input channel destroyed: '7ead9a7', fd=628 2020-07-14 12:23:32.063 31500-31590/? D/EnterpriseController: netId is 0 2020-07-14 12:23:32.063 31500-31590/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0 2020-07-14 12:23:32.063 31500-31590/? D/DnsProxyListener: DNSDBG::dns addrinfo af 0 - 10268 2020-07-14 12:23:32.064 4918-4918/? D/InputTransport: Input channel destroyed: '7ead9a7', fd=115 2020-07-14 12:23:32.065 6033-6033/? I/SurfaceFlinger: Display 21442653864348033 HWC layers: type | handle | flag | format | source crop (l,t,r,b) | frame | name ------------+--------------+------+-----------+----------------------------+---------------------+------ DEVICE | 0x79c6d818c0 | 0002 | RGBA_8888 | 0.0 0.0 1080.0 2400.0 | 0 0 1080 2400 | Splash Screen com.instagram.android#0 DEVICE | 0x79e76a27c0 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 73.0 | 0 0 1080 73 | StatusBar$_32074#0 DEVICE | 0x79e76a4c00 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 126.0 | 0 2274 1080 2400 | NavigationBar0$_32074#0 2020-07-14 12:23:32.068 31500-17677/? E/ResolverController: No valid NAT64 prefix (601, /0) 2020-07-14 12:23:32.068 31745-31781/? D/FastTrack: setFastTrackState: pid = 4918 ;tid= 4918 ;value= 0 2020-07-14 12:23:32.068 31745-31781/? D/FastTrack: setFastTrackState: pid = 4918 ;tid= 17650 ;value= 0 2020-07-14 12:23:32.069 6033-6033/? I/Layer: id=2788[1] Destroyed Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be - animation-leash#0 2020-07-14 12:23:32.070 31745-31976/? E/NetdEventListenerService: handleMessage: { when=0 what=10001 obj=com.android.server.connectivity.NetdEventListenerService$DnsResultParams@704c523 target=com.android.server.connectivity.NetdEventListenerService$DnsEventHandler } 2020-07-14 12:23:32.072 31745-31999/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 2020-07-14 12:23:32.072 31745-31999/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 2020-07-14 12:23:32.073 31500-31590/? D/EnterpriseController: netId is 0 2020-07-14 12:23:32.073 31500-31590/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0 2020-07-14 12:23:32.073 31500-31590/? D/DnsProxyListener: DNSDBG::dns addrinfo af 0 - 1000 2020-07-14 12:23:32.073 31745-6562/? I/ActivityManager: DSS OFF for com.instagram.android 2020-07-14 12:23:32.073 31745-31765/? D/CodecSolution: isMaxAspectPackageEx: com.example : false(0) 2020-07-14 12:23:32.074 31500-17679/? E/ResolverController: No valid NAT64 prefix (601, /0) 2020-07-14 12:23:32.075 31745-31765/? D/SIProcessListener: PID is 4918 State is 2 2020-07-14 12:23:32.076 31745-31961/? D/SICompactionHandler: pid:4918 not present in whitelist 2020-07-14 12:23:32.076 31745-31767/? D/GameManagerService: noteResumeComponent(), resumeComponent: com.example 2020-07-14 12:23:32.076 31745-32026/? D/GameManagerService: handleForegroundChange(). pkgName: com.example, clsName: com.example.MainActivity,FgActivityName:com.example/.MainActivity,userID:0 2020-07-14 12:23:32.076 31745-32026/? D/GameManagerService: handleForegroundChange(). same package. game has never resumed yet. ignore 2020-07-14 12:23:32.077 31745-6562/? D/GamePkgDataHelper: getSosPolicy(). com.example 2020-07-14 12:23:32.078 6002-6295/? E/Sensors: Sensor : Meta event 2020-07-14 12:23:32.079 31494-31494/? D/Zygote: Forked child process 17682 2020-07-14 12:23:32.081 31745-31976/? E/NetdEventListenerService: handleMessage: { when=0 what=10001 obj=com.android.server.connectivity.NetdEventListenerService$DnsResultParams@f9ed111 target=com.android.server.connectivity.NetdEventListenerService$DnsEventHandler } 2020-07-14 12:23:32.082 31745-31767/? D/GamePkgDataHelper: getSosPolicy(). com.example 2020-07-14 12:23:32.083 31745-31767/? D/GameManagerService: identifyGamePackage. com.example, mCurrentUserId: 0, callerUserId: 0 2020-07-14 12:23:32.083 31745-31767/? D/GamePkgDataHelper: getGamePkgData(). com.example 2020-07-14 12:23:32.085 17658-17658/? I/oid:fwkstartlo: The ClassLoaderContext is a special shared library. 2020-07-14 12:23:32.086 31745-862/? D/InputDispatcher: Focus entered window (16741): c007feb in display 0 0 2020-07-14 12:23:32.086 17682-17682/? E/Zygote: isWhitelistProcess - Process is Whitelisted 2020-07-14 12:23:32.088 31745-31774/? I/ActivityManager: Start proc 17682:com.samsung.sait.sohservice/1000 for service {com.samsung.sait.sohservice/com.samsung.sait.sohservice.service.MyJobService} 2020-07-14 12:23:32.088 17682-17682/? E/Zygote: accessInfo : 1 2020-07-14 12:23:32.090 31498-31498/? I/CameraService: onUidStateChanged: uid=10260, procState=9 2020-07-14 12:23:32.090 31498-31498/? I/CameraService: notifyMonitoredUids 2020-07-14 12:23:32.091 31498-31498/? I/CameraService: onUidStateChanged: uid=10077, procState=11 2020-07-14 12:23:32.091 31498-31498/? I/CameraService: onUidStateChanged: uid=10086, procState=20 2020-07-14 12:23:32.091 31745-31767/? I/WindowManager: Focus moving from null to Window{c007feb u0 com.example/com.example.MainActivity} displayId=0 2020-07-14 12:23:32.091 31745-31767/? I/WindowManager: Gaining focus: Window{c007feb u0 com.example/com.example.MainActivity} 2020-07-14 12:23:32.091 16741-16741/com.example D/ViewRootImpl@8cfb52[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1 2020-07-14 12:23:32.091 16741-16741/com.example D/InputMethodManager: prepareNavigationBarInfo() DecorView@af886fa[MainActivity] 2020-07-14 12:23:32.091 16741-16741/com.example D/InputMethodManager: getNavigationBarColor() -855310 2020-07-14 12:23:32.092 905-1110/? D/ra: limitGPUFreq:: freq = -1 2020-07-14 12:23:32.092 905-1110/? D/ra: limitCPUFreq:: freq = -1 2020-07-14 12:23:32.093 31745-6378/? D/InputMethodManagerService: mSecureKeypadEnabled = false 2020-07-14 12:23:32.093 31745-6378/? V/InputMethodManagerService: startInputOrWindowGainedFocusInternalLocked: reason=WINDOW_FOCUS_GAIN_REPORT_ONLY client=android.os.BinderProxy@7731c30 inputContext=null missingMethods= attribute=null startInputFlags=(none) softInputMode=STATE_UNSPECIFIED|ADJUST_RESIZE windowFlags=#81810100 unverifiedTargetSdkVersion=28 2020-07-14 12:23:32.093 31745-6378/? V/InputMethodManagerService: IME PreRendering MASTER flag: false, LowRam: false 2020-07-14 12:23:32.093 31745-6378/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@e0e6d4d attribute=null, token = android.os.BinderProxy@8e9d73a 2020-07-14 12:23:32.094 905-1110/? D/SDHMS:r: writeSysfs:: path = /sys/power/execution_mode_change, value = 0 2020-07-14 12:23:32.097 17658-17658/? I/oid:fwkstartlo: The ClassLoaderContext is a special shared library. 2020-07-14 12:23:32.099 17658-17658/? W/oid:fwkstartlo: Insufficient pre-allocated space to mmap vdex. 2020-07-14 12:23:32.100 17682-17682/? E/sait.sohservic: Not starting debugger since process cannot load the jdwp agent. 2020-07-14 12:23:32.102 17658-17658/? E/LoadedApk: Unable to instantiate appComponentFactory java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/base.apk", zip file "/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_arservicesforpersonsegmentation.apk", zip file "/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_caffe2.apk", zip file "/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_caffe2pytorchsharedmodule.apk"],nativeLibraryDirectories=[/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/lib/arm64, /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/base.apk!/lib/arm64-v8a, /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_arservicesforpersonsegmentation.apk!/lib/arm64-v8a, /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_caffe2.apk!/lib/arm64-v8a, /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_caffe2pytorchsharedmodule.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.LoadedApk.createAppFactory(LoadedApk.java:273) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:896) at android.app.LoadedApk.getClassLoader(LoadedApk.java:991) at android.app.LoadedApk.getResources(LoadedApk.java:1248) at android.app.ContextImpl.createAppContext(ContextImpl.java:2618) at android.app.ContextImpl.createAppContext(ContextImpl.java:2610) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6882) at android.app.ActivityThread.access$1600(ActivityThread.java:272) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2055) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8016) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076) Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_arservicesforpersonsegmentation.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:365) at dalvik.system.DexFile.(DexFile.java:107) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:465) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:424) at dalvik.system.DexPathList.(DexPathList.java:164) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:126) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:101) at dalvik.system.PathClassLoader.(PathClassLoader.java:74) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114) at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:892) ... 13 more Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/split_caffe2.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:365) at dalvik.system.DexFile.(DexFile.java:107) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:465) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:424) at dalvik.system.DexPathList.(DexPathLi 2020-07-14 12:23:32.103 17658-17658/? W/oid:fwkstartlo: JIT profile information will not be recorded: profile file does not exits. 2020-07-14 12:23:32.103 17682-17682/? D/ActivityThread: setConscryptValidator 2020-07-14 12:23:32.103 17658-17658/? W/oid:fwkstartlo: JIT profile information will not be recorded: profile file does not exits. 2020-07-14 12:23:32.103 17682-17682/? D/ActivityThread: setConscryptValidator - put 2020-07-14 12:23:32.103 17658-17658/? W/oid:fwkstartlo: JIT profile information will not be recorded: profile file does not exits. 2020-07-14 12:23:32.104 31745-1555/? I/ActivityManager: DSS OFF for com.samsung.sait.sohservice 2020-07-14 12:23:32.105 17658-17658/? W/oid:fwkstartlo: resources.arsc in APK '/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/base.apk' is compressed. 2020-07-14 12:23:32.120 17682-17682/? D/SOH_SERVICE: MyApplication - onCreate 2020-07-14 12:23:32.121 17682-17682/? D/SOH_SERVICE: JobService onCreate() 2020-07-14 12:23:32.123 17682-17682/? D/SOH_SERVICE: JobService onStartJob() main 1594718612123, Params 999 2020-07-14 12:23:32.124 17682-17682/? D/SOH_SERVICE: BatteryInfoService enqueueWork() - ServiceAlreadyRunning? false, main 1594718612123 2020-07-14 12:23:32.124 17682-17682/? D/SOH_SERVICE: JobService onStartJob() - No need to start job as SOC is more than 60 2020-07-14 12:23:32.126 17682-17682/? D/SOH_SERVICE: JobService onDestroy() 2020-07-14 12:23:32.130 31745-1555/? I/ActivityManager: Killing 12396:com.samsung.android.app.cocktailbarservice/u0a66 (adj 999): empty #49 2020-07-14 12:23:32.136 31745-31775/? I/libprocessgroup: Successfully killed process cgroup uid 10066 pid 12396 in 5ms 2020-07-14 12:23:32.146 17658-17658/? E/ACRA: Skipping ANR Detector for process: com.instagram.android:fwkstartlog 2020-07-14 12:23:32.148 17658-17658/? W/SoLoader: context.getApplicationContext returned null, holding reference to original context. 2020-07-14 12:23:32.153 31745-31961/? D/SICompactionHandler: pid:12396 not present in whitelist 2020-07-14 12:23:32.153 31494-31494/? I/Zygote: Process 12396 exited due to signal 9 (Killed) 2020-07-14 12:23:32.154 6033-6033/? I/SurfaceFlinger: Display 21442653864348033 HWC layers: type | handle | flag | format | source crop (l,t,r,b) | frame | name ------------+--------------+------+-----------+----------------------------+---------------------+------ DEVICE | 0x79c6d818c0 | 0002 | RGBA_8888 | 0.0 0.0 913.0 2400.0 | 166 0 1080 2400 | Splash Screen com.instagram.android#0 DEVICE | 0x79e76a5100 | 0002 | RGBA_8888 |1055.0 0.0 1080.0 2400.0 | 0 0 25 2400 | com.example/com.example.MainActivity$_16741#0 DEVICE | 0x79e76a27c0 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 73.0 | 0 0 1080 73 | StatusBar$_32074#0 DEVICE | 0x79e76a4c00 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 126.0 | 0 2274 1080 2400 | NavigationBar0$_32074#0 2020-07-14 12:23:32.156 17658-17658/? I/oid:fwkstartlo: Thread[1,tid=17658,Native,Thread*=0x7211c56000,peer=0x72190c58,"main"] recursive attempt to load library "/data/app/com.instagram.android-CBeM_TIScctOX5TlReGAFw==/lib/arm64/libfb.so" 2020-07-14 12:23:32.158 32074-32248/? D/NetworkController.MobileSignalController(0/1): onSignalStrengthsChanged signalStrength=SignalStrength:{mCdma=Invalid,mGsm=Invalid,mWcdma=CellSignalStrengthWcdma: ss=-101 ber=99 rscp=-89 ecno=0 level=1,mTdscdma=Invalid,mLte=Invalid,mNr=Invalid,SignalBarInfo{ wcdmaLevel=3 },P,rat=3,primary=CellSignalStrengthWcdma} level=3 2020-07-14 12:23:32.159 32074-32248/? D/NetworkController.MobileSignalController(0/1): getMobileIconGroup(): 9 2020-07-14 12:23:32.189 31498-32035/? I/CameraService: onUidStateChanged: uid=10260, procState=11 2020-07-14 12:23:32.189 31498-32035/? I/CameraService: notifyMonitoredUids 2020-07-14 12:23:32.190 31745-6378/? I/ActivityManager: Killing 12111:com.samsung.android.app.routines/u0a54 (adj 999): empty #49 2020-07-14 12:23:32.190 31498-32035/? I/CameraService: onUidStateChanged: uid=10260, procState=20 2020-07-14 12:23:32.190 31498-32035/? I/CameraService: notifyMonitoredUids 2020-07-14 12:23:32.191 31745-6378/? I/ActivityManager: Killing 14782:com.google.android.apps.translate/u0a277 (adj 999): empty #49 2020-07-14 12:23:32.192 31745-6378/? D/FreecessController: Receive signal-module info(callerPid:0,uid:10277) from freecessmonitor 2020-07-14 12:23:32.195 31745-31775/? I/libprocessgroup: Successfully killed process cgroup uid 10054 pid 12111 in 5ms 2020-07-14 12:23:32.205 31745-32109/? D/MdnieScenarioControlService: packageName : com.example className : com.example.MainActivity 2020-07-14 12:23:32.205 31745-32109/? V/MdnieScenarioControlService: setUIMode from UI function(3) 2020-07-14 12:23:32.215 31745-31961/? D/SICompactionHandler: pid:12111 not present in whitelist 2020-07-14 12:23:32.215 31494-31494/? I/Zygote: Process 12111 exited due to signal 9 (Killed) 2020-07-14 12:23:32.216 31745-31775/? I/libprocessgroup: Successfully killed process cgroup uid 10277 pid 14782 in 0ms 2020-07-14 12:23:32.226 31494-31494/? I/Zygote: Process 14782 exited due to signal 9 (Killed) 2020-07-14 12:23:32.226 31745-31961/? D/SICompactionHandler: pid:14782 not present in whitelist 2020-07-14 12:23:32.229 31498-32035/? I/CameraService: UidPolicy: No processes running for a uid=10277 disabled=0 2020-07-14 12:23:32.229 31498-32035/? I/CameraService: UidPolicy: onUidIdle, uid = 10277 2020-07-14 12:23:32.301 31745-31999/? W/WifiTransportLayerUtils: getApplicationCategory - IOException com.example 2020-07-14 12:23:32.433 31498-32035/? I/CameraService: onUidStateChanged: uid=10107, procState=16 2020-07-14 12:23:32.433 31745-31772/? D/PowerManagerService: [api] setDeviceIdleTempWhitelist: appids: [0]1000 [1]10244 (uid: 1000 pid: 31745) 2020-07-14 12:23:32.521 31745-31997/? D/WifiConnectivityMonitor.NetworkStatsAnalyzer: Backhaul result - RSSI:-41, CE:114, PE:95, TI:120, PTI:103, TW:138, PTW:130, Tx:876, Rx:908, TxS:935, RxS:888, RESULT:true, IC:0, ICT:5, WC:0, WCT:5, R:8, RC:0, IE:0, EC:0 2020-07-14 12:23:32.551 31745-31768/? I/WindowManager: Reparenting to original parent: Surface(name=Task=2822)/@0x61a346d, destroyLeash=true, surface=Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 2020-07-14 12:23:32.551 31745-31768/? V/WindowManager: Setting visibility of Window{7ead9a7 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity EXITING}: false, caller=com.android.server.wm.WindowContainer.sendAppVisibilityToClients:640 com.android.server.wm.AppWindowToken.setClientHidden:595 com.android.server.wm.AppWindowToken.onAnimationFinished:3597 com.android.server.wm.-$$Lambda$yVRF8YoeNdTa8GR1wDStVsHu8xM.run:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:100 2020-07-14 12:23:32.551 31745-31768/? E/WindowManager: win=Window{7ead9a7 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1178 com.android.server.wm.AppWindowToken.destroySurfaces:1159 com.android.server.wm.WindowState.onExitAnimationDone:5055 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.AppWindowToken.onAnimationFinished:3620 com.android.server.wm.-$$Lambda$yVRF8YoeNdTa8GR1wDStVsHu8xM.run:2 2020-07-14 12:23:32.551 31745-31768/? I/WindowManager: Destroying surface Surface(name=com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918)/@0x45d880 called by com.android.server.wm.WindowStateAnimator.destroySurface:1732 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:684 com.android.server.wm.WindowState.destroySurfaceUnchecked:3503 com.android.server.wm.WindowState.destroySurface:3477 com.android.server.wm.AppWindowToken.destroySurfaces:1178 com.android.server.wm.AppWindowToken.destroySurfaces:1159 com.android.server.wm.WindowState.onExitAnimationDone:5055 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 2020-07-14 12:23:32.552 6033-6153/? I/Layer: id=2794 removeFromCurrentState com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918#0 (63) 2020-07-14 12:23:32.552 6033-6158/? I/Layer: id=2795 removeFromCurrentState Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#1 (63) 2020-07-14 12:23:32.552 6033-6158/? I/Layer: id=2796 removeFromCurrentState Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#1 (63) 2020-07-14 12:23:32.552 6033-6158/? I/Layer: id=2793 removeFromCurrentState 7ead9a7 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity#0 (63) 2020-07-14 12:23:32.553 31745-31768/? E/WindowManager: win=Window{c91623c u0 Splash Screen com.instagram.android EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1178 com.android.server.wm.AppWindowToken.destroySurfaces:1159 com.android.server.wm.WindowState.onExitAnimationDone:5055 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.AppWindowToken.onAnimationFinished:3620 com.android.server.wm.AppWindowToken.commitVisibility:838 2020-07-14 12:23:32.553 31745-31768/? I/WindowManager: Destroying surface Surface(name=Splash Screen com.instagram.android)/@0x8b45eb9 called by com.android.server.wm.WindowStateAnimator.destroySurface:1732 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:684 com.android.server.wm.WindowState.destroySurfaceUnchecked:3503 com.android.server.wm.WindowState.destroySurface:3477 com.android.server.wm.AppWindowToken.destroySurfaces:1178 com.android.server.wm.AppWindowToken.destroySurfaces:1159 com.android.server.wm.WindowState.onExitAnimationDone:5055 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 2020-07-14 12:23:32.553 6033-6158/? I/SurfaceFlinger: id=2796 Removed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#1 (63) 2020-07-14 12:23:32.553 6033-6158/? I/SurfaceFlinger: id=2793 Removed 7ead9a7 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity#0 (63) 2020-07-14 12:23:32.553 6033-7411/? I/Layer: id=2787 removeFromCurrentState Splash Screen com.instagram.android#0 (63) 2020-07-14 12:23:32.553 6033-6153/? I/SurfaceFlinger: id=2794 Removed com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918#0 (63) 2020-07-14 12:23:32.553 6033-7411/? I/SurfaceFlinger: id=2787 Removed Splash Screen com.instagram.android#0 (63) 2020-07-14 12:23:32.553 31745-31768/? D/TspStateManagerInternal: updateDefaultValue customSetting=null 2020-07-14 12:23:32.554 6033-7411/? I/Layer: id=2783 removeFromCurrentState animation background stackId=6#0 (63) 2020-07-14 12:23:32.554 6033-7411/? I/SurfaceFlinger: id=2783 Removed animation background stackId=6#0 (63) 2020-07-14 12:23:32.555 6033-6153/? I/Layer: id=2786 removeFromCurrentState c91623c Splash Screen com.instagram.android#0 (63) 2020-07-14 12:23:32.555 6033-6153/? I/Layer: id=2785 removeFromCurrentState AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}}#0 (63) 2020-07-14 12:23:32.555 6033-6153/? I/Layer: id=2784 removeFromCurrentState Task=2822#0 (63) 2020-07-14 12:23:32.555 6033-6153/? I/Layer: id=2782 removeFromCurrentState Stack=6#0 (63) 2020-07-14 12:23:32.556 6033-6550/? I/SurfaceFlinger: id=2786 Removed c91623c Splash Screen com.instagram.android#0 (63) 2020-07-14 12:23:32.556 6033-6550/? I/SurfaceFlinger: id=2785 Removed AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}}#0 (63) 2020-07-14 12:23:32.556 6033-6550/? I/SurfaceFlinger: id=2784 Removed Task=2822#0 (63) 2020-07-14 12:23:32.556 6033-6153/? I/SurfaceFlinger: id=2782 Removed Stack=6#0 (63) 2020-07-14 12:23:32.559 6033-6033/? I/Layer: id=2796[1] Destroyed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-bounds#1 2020-07-14 12:23:32.559 6033-6033/? I/Layer: id=2782[1] Destroyed Stack=6#0 2020-07-14 12:23:32.559 6033-6033/? I/Layer: id=2783[1] Destroyed animation background stackId=6#0 2020-07-14 12:23:32.560 6033-6033/? I/Layer: id=2784[1] Destroyed Task=2822#0 2020-07-14 12:23:32.560 6033-6033/? I/Layer: id=2794[1] Destroyed com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity$_4918#0 2020-07-14 12:23:32.560 6033-6033/? I/Layer: id=2793[1] Destroyed 7ead9a7 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity#0 2020-07-14 12:23:32.560 6033-6033/? I/Layer: id=2786[1] Destroyed c91623c Splash Screen com.instagram.android#0 2020-07-14 12:23:32.560 6033-6033/? I/Layer: id=2785[1] Destroyed AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}}#0 2020-07-14 12:23:32.561 6033-7409/? I/SurfaceFlinger: id=2795 Removed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#1 (55) 2020-07-14 12:23:32.562 6033-6033/? I/Layer: id=2787[1] Destroyed Splash Screen com.instagram.android#0 2020-07-14 12:23:32.564 6033-6033/? I/SurfaceFlinger: Display 21442653864348033 HWC layers: type | handle | flag | format | source crop (l,t,r,b) | frame | name ------------+--------------+------+-----------+----------------------------+---------------------+------ DEVICE | 0x79c7483200 | 0002 | RGBA_8888 | 3.0 0.0 1080.0 2400.0 | 0 0 1077 2400 | com.example/com.example.MainActivity$_16741#0 DEVICE | 0x79e76a27c0 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 73.0 | 0 0 1080 73 | StatusBar$_32074#0 DEVICE | 0x79e76a4c00 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 126.0 | 0 2274 1080 2400 | NavigationBar0$_32074#0 2020-07-14 12:23:32.568 6033-6033/? I/Layer: id=2795[1] Destroyed Surface(name=AppWindowToken{a106eb0 token=Token{7bee1f3 ActivityRecord{6cbdc62 u0 com.instagram.android/com.instagram.share.handleractivity.CustomStoryShareHandlerActivity t2822}}})/@0x5a78032 - animation-leash#1 2020-07-14 12:23:32.584 31745-31768/? I/WindowManager: Reparenting to original parent: Surface(name=Task=2821)/@0x6872495, destroyLeash=true, surface=Surface(name=AppWindowToken{f85488d token=Token{98bb524 ActivityRecord{ee229b7 u0 com.example/.MainActivity t2821}}})/@0xf7026be ```
MateusAndrade commented 4 years ago

Click to expand a logcal output

Did you try setting access to the storage on your application or something similar to that?

retyui commented 4 years ago

@MateusAndrade

"your application"

I use an ./example app

Did you try setting access to the storage

And of course, I provided "Storage" access

mikehardy commented 4 years ago

ClassNotFoundException? How is that Android10 specific? That's an APK construction issue. Perhaps a dependency is missing on androidx.core? Not sure how but ClassNotFoundException means "you didn't have the right dependencies in your app" somehow.

Very strange.

https://developer.android.com/jetpack/androidx/releases/core

leeeomaaax commented 4 years ago

@retyui @alicaglayan

I found a workaround that seems to be working consistently.

  1. pass images as base64
  2. add a 'forceDialog' flag in the share single options. (this will force the native code to go through a branch of conditions that more accurately replicates whats documented in https://developers.facebook.com/docs/instagram/sharing-to-stories/ but won't show a dialog probably because it's a single share)
        global.Buffer = global.Buffer || require('buffer').Buffer // add this somewhere high in the app hierarchy

        const backgroundImageRes = await axios.get(
          'http://www.am570.com.br/images/posts/1119/1119.jpg',
          {
            responseType: 'arraybuffer',
          },
        )
        const base64BackgroundImage = Buffer.from(
          backgroundImageRes.data,
          'binary',
        ).toString('base64')
        const stickerImageRes = await axios.get('http://www.am570.com.br/images/posts/1119/1119.jpg', {
          responseType: 'arraybuffer',
        })
        const base64StickerImage = Buffer.from(
          stickerImageRes.data,
          'binary',
        ).toString('base64')

        const shareOptions = {
          social: Share.Social.INSTAGRAM_STORIES,
          method: Share.InstagramStories.SHARE_BACKGROUND_AND_STICKER_IMAGE,
          stickerImage: `data:image/jpeg;base64,${base64StickerImage}`,
          backgroundImage: `data:image/jpeg;base64,${base64BackgroundImage}`,
          backgroundTopColor: Colors.BRAND_PRIMARY,
          backgroundBottomColor: Colors.BRAND_SECONDARY,
          attributionURL: shareLink, // beta
          forceDialog: true, // necessary due to bug in node_modules/react-native-share/android/src/main/java/cl/json/social/SingleShareIntent.java
        }
        console.log(shareOptions)

        const res = await Share.shareSingle(shareOptions)
leeeomaaax commented 4 years ago

ps. on IOS it works fine, except that the promise from shareSingle won't return.

const res = await Share.shareSingle(shareOptions)

@mikehardy @MateusAndrade , is this a known issue or should I open a new issue here on github? Are there any workarounds?

retyui commented 4 years ago

@leeeomaaax

java.lang.SecurityException: Permission Denial: opening provider cl.json.RNShareFileProvider from ProcessRecord{2fa6f3d 4918:com.instagram.android/u0a260} (pid=4918, uid=10260) that is not exported from UID 10268

Seems we need to grant URI permission all the time?

https://github.com/react-native-community/react-native-share/blob/3217a1fdee6cab26fdbca148abda92818689ced3/android/src/main/java/cl/json/social/SingleShareIntent.java#L79

leeeomaaax commented 4 years ago

@retyui, I'm not sure what URI permission means on the android native side (is it the same as WRITE_EXTERNAL_STORAGE?)

On the react-native side, your app will need WRITE_EXTERNAL_STORAGE permission but will ask for it only once.

ps. I believe this is a temporary workaround since the native android code from this lib seems to be handling the permissions but it's not (for the shareSingle at least).

const writeGranted = Platform.OS === 'ios' || (await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE, )) if (!writeGranted) return

mikehardy commented 4 years ago

WRITE_EXTERNAL_STORAGE permission won't even be granted in modern android if I understand correctly https://developer.android.com/preview/privacy/storage#permissions

So that solution should be discarded immediately for new solutions

It's my understanding from native android that granting URI access is the right way to do it basically at all times, along with a FileProvider configured in android resource XML paths, some example:

  1. filepaths: https://github.com/ankidroid/Anki-Android/pull/6543/files#diff-02fb73a74fc37272ca4c8048890705ec
  2. permissions: https://github.com/ankidroid/Anki-Android/pull/6543/files#diff-097a1b08d60abe4a789cc6394b0dbf27R172-R173
lcsvcn commented 4 years ago

Hello, I am facing the same issue.

Anyone have any success to fix or bypass this error?

The behavior is the same as the gif provided by @retyui

retyui commented 4 years ago

@lcsvcn

To work for me on Andoird I did the next:

1) Add a permission in android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

2) Then I requested a persimmon:

const result = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE)

if(!isGranted(result)){
  // show warning message
  return;
}

3) The when permission was granted invoke .shareSingle(...) with a forceDialog flag and images as base64!


const shareOptions = {
    title,
    method: Share.InstagramStories.SHARE_BACKGROUND_AND_STICKER_IMAGE,
    // use base64  
    backgroundImage: `data:image/jpeg;base64,...`,
    stickerImage: `data:image/jpeg;base64,...`,,
    social: Share.Social.INSTAGRAM_STORIES,
    // necessary due to bug in node_modules/react-native-share/android/src/main/java/cl/json/social/SingleShareIntent.java
    forceDialog: true, 
};

await Share.shareSingle(shareOptions);
dylan-westbury commented 4 years ago

It appears only share background and sticker image works for Android.

For example:

Share sticker image works for iOS but not Android (android instagram opens for a brief second but then closes)

try {
      const shareOptions = {
        method: Share.InstagramStories.SHARE_STICKER_IMAGE,
        stickerImage: SHARE_STAR_IMAGE_BASE64,
        backgroundBottomColor: '#FEFEFE',
        backgroundTopColor: '#FEFEFE',
        social: Share.Social.INSTAGRAM_STORIES,
        failOnCancel: false,
        forceDialog: true
      }

      await Share.shareSingle(shareOptions);
    }
    catch (err) {
      Alert.alert('Could not share to Instagram');
    }
  };

Share background and sticker image works for iOS and Android

    try {
      const shareOptions = {
        method: Share.InstagramStories.SHARE_BACKGROUND_AND_STICKER_IMAGE,
        stickerImage: SHARE_STAR_IMAGE_BASE64,
        backgroundImage: SHARE_STAR_IMAGE_BASE64,
        backgroundBottomColor: '#FEFEFE',
        backgroundTopColor: '#FEFEFE',
        social: Share.Social.INSTAGRAM_STORIES,
        failOnCancel: false,
        forceDialog: true
      }

      await Share.shareSingle(shareOptions);
    }
    catch (err) {
      Alert.alert('Could not share to Instagram');
    }
MateusAndrade commented 4 years ago

@dylan-westbury there is anything being shown in the logcat when sharing a sticker on Android?

dylan-westbury commented 4 years ago

@MateusAndrade nothing helpful to point out why it was crashing, I believe an exception within Instagram was triggering and it was attempting to write to instagram error logs.

dylan-westbury commented 4 years ago

@MateusAndrade I did note these errors from logcat, but they also show for when insta story share is working using background and sticker mode

07-28 14:18:30.505  5022  5035 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://com.heyswysh.swysh.provider/myexternalimages/sticker.jpg from pid=4499, uid=10093 requires the provider be exported, or grantUriPermission()
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:631)
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:501)
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:492)
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:420)
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:302)
07-28 14:18:30.505  5022  5035 E DatabaseUtils:     at android.os.Binder.execTransact(Binder.java:697)
07-28 14:18:30.506  4499  4534 E StoryShareMediator: Exception in ExternalMediaImportCallable
07-28 14:18:30.506  4499  4534 E StoryShareMediator: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://com.heyswysh.swysh.provider/myexternalimages/sticker.jpg from pid=4499, uid=10093 requires the provider be exported, or grantUriPermission()
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.os.Parcel.readException(Parcel.java:2004)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:698)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1410)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1247)
07-28 14:18:30.506  4499  4534 E StoryShareMediator:    at android.content.ContentResolver.openInputStream(ContentResolver.java:967)
MateusAndrade commented 4 years ago

07-28 14:18:30.505 5022 5035 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://com.heyswysh.swysh.provider/myexternalimages/sticker.jpg from pid=4499, uid=10093 requires the provider be exported, or grantUriPermission()

I think this line is related to the permissions when sharing files, maybe you are missing some permission/implementation on the native side on Android?

Also, we might need to look at the code on Android here:

https://github.com/react-native-community/react-native-share/blob/5aa24c5fe1fa6bf9de939b388d1f772762d793e4/android/src/main/java/cl/json/social/SingleShareIntent.java#L75-L84

retyui commented 4 years ago

Maybe it helps to understand the problem(

I use a workaround with a local file and it works on Android without asking Storage permissions.

import Share from 'react-native-share';
import { DocumentDirectoryPath, writeFile } from 'react-native-fs';

const { INSTAGRAM_STORIES } = Share.Social;
const { SHARE_BACKGROUND_IMAGE } = Share.InstagramStories;

const normalisePath = (path) => Platform.select({ default: path, android: `file://${path}` });

export const base64ToLocalFile = async ({ base64, filename }) => {
  const path = `${DocumentDirectoryPath}/${filename}`;

  await writeFile(path, base64, 'base64');

  return normalisePath(path);
};

export const shareToInstagramStory = async (base64Data) => {
  const backgroundImage =
    Platform.OS === 'ios'
      ? `data:image/jpeg;base64,${base64Data}`
      : await base64ToLocalFile({ base64: base64Data, filename: 'tmp.jpg' });

  const shareOptions = {
    title: 'test',
    method: SHARE_BACKGROUND_IMAGE,
    backgroundImage,
    social: INSTAGRAM_STORIES,
    ...Platform.select({
      // Necessary due to bug in
      // node_modules/react-native-share/android/src/main/java/cl/json/social/SingleShareIntent.java
      android: {
        forceDialog: true,
      },
    }),
  };

  await Share.shareSingle(shareOptions);
};
stale[bot] commented 4 years ago

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[bot] commented 3 years ago

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.

clembesso commented 3 years ago

Same issue here, it works on iOS and not android... If I use shareSingle, it doesn't work

  captureRef(this.viewRef.current, {
        format: "jpg",
        quality: 1,
        result: 'base64',
      }).then(uri => {
        let shareOptions = {
          method: Share.InstagramStories.SHARE_STICKER_IMAGE,
          stickerImage: `data:image/jpg;base64,${uri}`,
          backgroundBottomColor: '#32323C',
          backgroundTopColor: '#3D4C66',
          social: Share.Social.INSTAGRAM_STORIES,
          failOnCancel: false,
          forceDialog: true
        };
          Share.shareSingle(shareOptions).then((res) => { console.log('res',res) })
          .catch((err) => { console.log('err',err); });
      },
      ).catch(err => console.log(err))

but, if I use Share.Open like this :

let shareOptions = {
          url: `data:image/jpg;base64,${uri}`,
          backgroundBottomColor: '#32323C',
          backgroundTopColor: '#3D4C66',
          failOnCancel: false,
          forceDialog: true
        };
        Share.open(shareOptions).then((res) => { console.log('res',res) })
          .catch((err) => { console.log('err',err); });

And then, going to instagram stories, it works...

Do you have an idea why ?

renatomserra commented 3 years ago

Also having this, Facebook stories work fine on both iOS and Android, but Insta only works on iOS. Android throws a native error of file permissions as above.

retyui commented 3 years ago

@RenatoSerra22

We use a workaround with base64 and it work for Android to

see: https://github.com/react-native-share/react-native-share/issues/808#issuecomment-668741231

renatomserra commented 3 years ago

@retyui thank you, i tried that but i think something was still failing native side, ill try to do some USB debugging.

renatomserra commented 3 years ago

Just tested it with logcat and still getting the same error on Android 11, even with your workaround unfortunately :(

ACHAGO commented 3 years ago

Same issue, it is working well on android emulator, but not on real device, i tested on Oppo

renatomserra commented 3 years ago

If i try to pass down a uri to a file instead of base64, i get the following error instead

Click for stack trace

``` 04-01 12:23:18.154 23118 23180 E StoryShareMediator: Exception in ExternalMediaImportCallable 04-01 12:23:18.154 23118 23180 E StoryShareMediator: java.io.FileNotFoundException: open failed: EACCES (Permission denied) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:315) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:220) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.2wi.A00(:11) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.2wi.A01(:14) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.Eto.A01(:8) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.DFo.A00(:8) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.4eP.A00(:12) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.Cup.run(:28) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at java.lang.Thread.run(Thread.java:919) 04-01 12:23:18.154 23118 23180 E StoryShareMediator: at X.0R5.run(:5) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: Could not dispatch action since the SDK service is disabled 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: X.2LW: The Zero SDK service is not enabled 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.1FB.A00(:9) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.1FK.BEC(:0) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.0cx.A01(:66) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.0cx.onAppForegrounded(:12) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.0ms.A01(:76) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at X.0ms.B69(:0) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at com.instagram.base.activity.IgActivity.onResume(:30) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.Activity.performResume(Activity.java:8050) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4266) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4308) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.os.Handler.dispatchMessage(Handler.java:107) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.os.Looper.loop(Looper.java:224) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at android.app.ActivityThread.main(ActivityThread.java:7519) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at java.lang.reflect.Method.invoke(Native Method) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) 04-01 12:23:18.155 23118 23118 E IgZeroNetworkChangeTrigger: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: Could not dispatch action since the SDK service is disabled 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: X.2LW: The Zero SDK service is not enabled 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at X.1FB.A00(:9) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at X.1FA.onAppForegrounded(:7) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at X.0ms.A01(:76) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at X.0ms.B69(:0) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at com.instagram.base.activity.IgActivity.onResume(:30) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.Activity.performResume(Activity.java:8050) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4266) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4308) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.os.Handler.dispatchMessage(Handler.java:107) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.os.Looper.loop(Looper.java:224) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at android.app.ActivityThread.main(ActivityThread.java:7519) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at java.lang.reflect.Method.invoke(Native Method) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) 04-01 12:23:18.160 23118 23118 E IgZeroAppLifecycleTrigger: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995) ```

Ive been trying to debug this for a while on the native side with no success :/ i'd be happy to contribute with a PR but i cant find the root cause. @MateusAndrade any guidance would be awesome i'd really love to ship this feature and seems quite a few of us are stuck. 🙏

MateusAndrade commented 3 years ago

If i try to pass down a uri to a file instead of base64, i get the following error instead

Click for stack trace Ive been trying to debug this for a while on the native side with no success :/ i'd be happy to contribute with a PR but i cant find the root cause. @MateusAndrade any guidance would be awesome i'd really love to ship this feature and seems quite a few of us are stuck. 🙏

Hi @RenatoSerra22, you are welcome! Did you try debugging using the example application? Usually, this works for me, also I think this is related to this file as @retyui stated.

Btw, what do you think about updating the docs with @retyui work-around? It's not a fix for the problem, but at least it will let other users trespass this issue until a proper fix is sent!

Let me know if there is anything that I can help you with. 😄

renatomserra commented 3 years ago

Ok turns out in my case its because im stupid 😂 I installed instagram and logged in on my test phone, but never posted anything so i was never prompted for storage permissions by instagram. The error i was getting stopped once i gave instagram storage permissions, i was never using base64 but instead always passing a local file uri which is what @retyui is converting to in his workaround.

ACHAGO commented 3 years ago

nothing is working, no instagram story , no facebook story

kahakai commented 3 years ago

I have spent a couple on days on the problem by myself and with my colleagues, and tried every single solution I found. @retyui's solution also didn't work for me. Moreover, his solution worked on one half of the phones and didn't work on the other half, e.g. it didn't work on some high-end phones and didn't work on some mid-end phones. The was no relationship between the processor power and Android version. We came to the conclusion that the bug is in the react-native-share library, but we were wrong, more on this later in the text. I have also implemented a native module with the method that was wrote as on Instagram Platform documentation page. Still wasn't working. Then I dived into the logs trying out how to find the right combination of extras and flags for the Intent on Android to mimic the Intent that is passed when sharing from the Share Menu and make it work. The solution is working on all devices and Android versions that we have to test on. The key is to use Intent.EXTRA_STREAM. Here is the code:

@ReactMethod
fun shareToInstagramStories(encodedUri: String, promise: Promise) {
    val fileUri = FileProvider.getUriForFile(
        context,
        "${BuildConfig.APPLICATION_ID}.provider",
        encodedUri.toUri().toFile()
    )

    val intent = Intent(Intent.ACTION_SEND).apply {
        component = ComponentName(
            "com.instagram.android",
            "com.instagram.share.handleractivity.StoryShareHandlerActivity"
        )
        flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
        type = "image/png"
        putExtra(Intent.EXTRA_STREAM, fileUri)
    }

    context.grantUriPermission("com.instagram.android", fileUri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
    context.addActivityEventListener(object : ActivityEventListener {
        override fun onNewIntent(intent: Intent?) {
            // Do nothing
        }

        override fun onActivityResult(
            activity: Activity?,
            requestCode: Int,
            resultCode: Int,
            data: Intent?
        ) {
            if (requestCode == SHARE_REQUEST_CODE) {
                promise.resolve("Shared to Instagram Stories.")
            }
        }
    })

    try {
        context.startActivityForResult(intent, SHARE_REQUEST_CODE, null)
    } catch (e: ActivityNotFoundException) {
        promise.reject("-1001", "Instagram app not found.")
    }
}

However, one problem persists: now we cannot pass in additional parameters such as "top_background_color" and "bottom_background_color" that you can also need. We needed them. Spent another day on this trying every combination of Intent actions and extras, data and ClipData. It worked only on the second call of the method where the first call only opened Instagram camera. Some hours ago an update with the new version of Instagram arrived to the Play Store without any information of the update changes. I updated Instagram on the phone and it magically worked! So I tried the initial implementation of the sharing to Instagram Stories in our app that uses react-native-share and checked that it works now! The native implementation as described on Instagram Platform documentation page also works from now as it should have.

The conclusion of the story is that sharing to Instagram Stories is finally fixed in the Instagram app itself and works! There was a bug of their side. The version of Instagram app with the fix is 182.0.0.29.124. To cover every user of our app with the working solution we now use the implementation with react-native-share and check the version of Instagram installed on the user's device with PackageManager on Android to fallback to the native module implementation that I wrote above.

clembesso commented 3 years ago

@artnest i will try this, thank you so much for you work, you and your team !

renatomserra commented 3 years ago

well done @artnest, yeah there was a bug on instagram side with a concurrency issue accessing preferences, it would cause stories to open but not load the picture into the story. I tested different apps that share stories to make sure it was the error i saw from insta in the logs and they had the same issue. I started saving my image to users library so i could launch, and they could then load it from there once stories open. But i can confirm you are right and insta fixed this in their latest update and it works consistently!

alinavaie commented 3 years ago

PackageManager

Thanks for your reply. I can confirm it works on the latest version of Instagram. But I didn't get how can I check the installed Instagram version from my react native app.

ACHAGO commented 3 years ago

Yes its working with current IG version, but not with the sticker unfourtunetly, the image is loaded , but not the sticker

kahakai commented 3 years ago

Yes its working with current IG version, but not with the sticker unfourtunetly, the image is loaded , but not the sticker

It is working for me for Share.InstagramStories.SHARE_STICKER_IMAGE method. However, I didn't check if the others were also fixed by the Instagram update.

kahakai commented 3 years ago

PackageManager

Thanks for your reply. I can confirm it works on the latest version of Instagram. But I didn't get how can I check the installed Instagram version from my react native app.

I didn't find a way to check the version of installed apps on Android from React Native side and implemented a method for myself in a native module.

Snippet from own InstagramShare native module on Android side:

private const val INSTAGRAM_VERSION_SHARE_FIXED = "182.0.0.29.124"

@ReactMethod
fun isSharingToInstagramFixed(promise: Promise) {
    val packageManager: PackageManager = context.packageManager

    try {
        val packageInfo: PackageInfo = packageManager.getPackageInfo("com.instagram.android", 0)
        val version: String = packageInfo.versionName

        if (Version(version).isAtLeast(INSTAGRAM_VERSION_SHARE_FIXED)) {
            promise.resolve(true)
        } else {
            promise.resolve(false)
        }
    } catch (e: PackageManager.NameNotFoundException) {
        promise.reject("-1001", "Instagram app not found.")
    }
}

I took a library for proper version strings comparison here: https://github.com/G00fY2/version-compare

Snippet from own InstagramShare.js on React Native side:

export const isSharingToInstagramFixed = async () => {
  switch (Platform.OS) {
    case 'ios':
      return true;
    case 'android':
      return await InstagramShare.isSharingToInstagramFixed();
  }
};

queries tag in AndroidManifest.xml for the PackageManager usage on target API 30:

<queries>
    <package android:name="com.instagram.android" />
</queries>
kristijantomic commented 3 years ago

ps. on IOS it works fine, except that the promise from shareSingle won't return.

const res = await Share.shareSingle(shareOptions)

@mikehardy @MateusAndrade , is this a known issue or should I open a new issue here on github? Are there any workarounds?

Have you ever found if not resolving promise on iOS is intentional?

dylan-westbury commented 3 years ago

Anyone able to make it work for image from a URL as opposed to local file? Perhaps need to save as local file then share to Instagram to avoid permission error

kaioduarte commented 3 years ago

Anyone able to make it work for image from a URL as opposed to local file? Perhaps need to save as local file then share to Instagram to avoid permission error

It's not possible. From the docs: "The Uri needs to be a content Uri to a local file on the device."

https://developers.facebook.com/docs/instagram/sharing-to-stories

uncvrd commented 3 years ago

Ok...so for those that may have not taken the most obvious step. I was using an emulator and installed Instagram but I never allowed device permissions WITHIN the Instagram app to access photos etc. So every time I was trying to generate an instagram story, the app would flash open for a second and then immediately close. After opening instagram, accepting THEIR permissions, and trying to generate a story. It worked.

Wasted a whole day on this.

So I hope this at least helps someone else :')

sonivaibhav27 commented 3 years ago

Anyone who cannot share a video to instagram , tries to put type in share options await Share.shareSingle({ social: Share.Social.INSTAGRAM, url: url, forceDialog: true, type: "video/mp4", })