achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
177 stars 15 forks source link

[1.1.0] iOS: Exception when backgrounding the app #26

Closed simonsturge closed 6 months ago

simonsturge commented 6 months ago

In the new 1.1.0 version, the app is crashing when backgrounding with the following log:

 DEBUG  useShareIntent[to-background] reset intent
 ERROR  Error: FunctionCallException: Calling the 'clearShareIntent' function has failed (at ExpoModulesCore/SyncFunctionComponent.swift:87)
→ Caused by: ArgumentCastException: The 1st argument cannot be cast to type String (at ExpoModulesCore/JavaScriptUtils.swift:40)
→ Caused by: NullCastException<String>: Cannot cast null to non-optional 'String' (at ExpoModulesCore/DynamicRawType.swift:25), js engine: hermes
 DEBUG  useShareIntent[active] refresh intent
 DEBUG  useShareIntent[refresh] null

IMG_C40EFDDA22AC-1

achorein commented 6 months ago

do you use a "static" build ?

achorein commented 6 months ago

I cannot reproduce your issue :/

can you try this :

if it display "to-background" and not crash i can do a patch...

simonsturge commented 6 months ago

do you use a "static" build ?

Yes, it's a requirement of Firebase I believe

if it display "to-background" and not crash i can do a patch...

it does display "to-background", no crash when handled manually

Thanks!

achorein commented 6 months ago

fixed in v1.1.1 and v0.3.1. fill free to reopen if the problem persist