react-native-share: The callback is error after i shared successfully

Steps to reproduce

  1. I share message to wechat
  2. after shared successfully I got this error :
'error', { [Error: User did not share]
      line: 265159,
      column: 35,
      sourceURL: 'http://localhost:8081/index.delta?platform=android&dev=true&minify=false' }

Expected behaviour

after shared successfully I got successful

Actual behaviour

after shared successfully I got error

Environment

  • React Native version:0.59.10
  • React Native platform + platform version: Android 9.0 HuaWei Mate 10

react-native-share

Version: “^1.2.1”

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 32

Most upvoted comments

Can we re-open this, please? The issue is still there. I’m facing the same problem with a Google Pixel 3A

@MateusAndrade I’m working on the same project as @benevbright. I tested react-native-share 3.3.3 with @damiansnp’s patch on my Huawei P20 Pro and can confirm it works. The promise resolves correctly with the name of the app that was used for sharing. Also the “copy to clipboard” share option works without leaving the promise unresolved.

Without the patch, this is the error I get after successfully sharing on 3.3.3: [Error: User did not share]

I guess these are related.

It’s mentioning ‘intent with ShareCompact’ and it will allow us to use Android share intent instead of Huawei share intent.

ShareCompact example: https://stackoverflow.com/a/36188125/949795 Migrating to ShareCompact seems to be the right direction. What do you think?

@MateusAndrade Unfortunately, the Huawei phone is not with me right now… I will test the latest version first with the Huawei device later and come back here.

Hmm, maybe we can set a prop to set which method you are going to use. What do you think @benevbright ?

@MateusAndrade I got it. I think so too. And I’m aware of the note about compatibility versions with RN. But apparently, we’re using RN 0.61.5 and rn-share 1.0.27 without any problem except the Huawei. (it’s off-topic, though)

@hamoudaarfaoui I don’t think so. That’s why I pointed out the fact that we’re running our product in Germany.