Skip to content

Unhandled JS Exception: Invariant Violation: Cannot have a non-function arg after a function arg., js engine: hermes #36

@haryelramalho

Description

@haryelramalho

I was using the old version that had auth, events, and init methods. But now, I need to upgrade to the new one because I need the Expo plugin, and I can’t open the SDK because the app crashes when it tries to.

This is the error:

*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Invariant Violation: Cannot have a non-function arg after a function arg., js engine: hermes', reason: 'Unhandled JS Exception: Invariant Violation: Cannot have a non-function arg after a function arg., js engine: hermes, stack:
invariant@1045:25
nonPromiseMethodWrapper@2615:37
authorize@210636:27
anonymous@210465:39
anonymous@210512:77
onPress@218805:59
invokeFunc@197525:29
trailingEdge@197565:29
timerExpired@197554:31
anonymous@17051:49
_callTimer@17000:16
callTimers@17141:18
__callFunction@1294:37
anonymous@1133:29
__guard@1240:14
callFunctionReturnFlushedQueue@1132:20
'
*** First throw call stack:
(0x18fe7e5fc 0x18d3f9244 0x1005cf3b0 0x10063c4b4 0x10063ccdc 0x18fe80e34 0x18fe7fe7c 0x18fee3a38 0x100600b90 0x100602d00 0x100602954 0x102b3488c 0x102b36578 0x102b3e454 0x102b3f25c 0x102b4c6fc 0x102b4bd0c 0x21ac10680 0x21ac0e474)
libc++abi: terminating due to uncaught exception of type NSException

And here is the js code:

const handleGetTiktokData = useCallback(() => {
  authorize({
    redirectURI: <URL_HERE>,
    scopes: [Scopes.user.info.basic, Scopes.video.list],
    callback: (authCode, codeVerifier) => {
      // codeVerifier is returned only on Android
      console.log(authCode, codeVerifier);
    },
  });
}, []);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions