Giter Site home page Giter Site logo

[Sentry] Error: [ethjs-query] the Eth object requires that the first input 'provider' must be an object, got 'und... about metamask-mobile HOT 9 OPEN

sentry-io avatar sentry-io commented on July 21, 2024
[Sentry] Error: [ethjs-query] the Eth object requires that the first input 'provider' must be an object, got 'und...

from metamask-mobile.

Comments (9)

christopherferreira9 avatar christopherferreira9 commented on July 21, 2024

Hi! I can’t see any reference to WalletConnect other than the init that occurs when launching the wallet. Is there any extra info available?

from metamask-mobile.

sethkfman avatar sethkfman commented on July 21, 2024

Play Console Log

Exception v6.c: Error: [ethjs-query] the Eth object requires that the first input 'provider' must be an object, got 'undefined' (i.e. 'const eth = new Eth(provider);'), js engine: hermes, stack:
Eth@1:2775775
NonceTracker@1:7371352
TransactionController@1:7358673
Engine@1:2709815
init@1:2716810
anonymous@1:5988908
onPersistComplete@1:5708523
rehydrate@1:5776201
_rehydrate@1:5767164
anonymous@1:5767258
anonymous@1:363065
_callTimer@1:362347
callTimers@1:364149
__callFunction@1:266653
anonymous@1:265020
__guard@1:265972
callFunctionReturnFlushedQueue@1:264978
  at com.facebook.react.modules.core.ExceptionsManagerModule.reportException (ExceptionsManagerModule.java:72)
  at java.lang.reflect.Method.invoke
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188)
  at com.facebook.jni.NativeRunnable.run (NativeRunnable.java)
  at android.os.Handler.handleCallback (Handler.java:971)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
  at android.os.Looper.loopOnce (Looper.java:206)
  at android.os.Looper.loop (Looper.java:296)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228)
  at java.lang.Thread.run (Thread.java:1012)

from metamask-mobile.

Cal-L avatar Cal-L commented on July 21, 2024

@christopherferreira9 Digging into a little deeper:

We can see two logs

  • WalletConnectV2::init(), which indicates WCV2 is initializing (indicating it's most likely a cold start from a deeplink)
  • Error: Engine does not exist, which happens when you try to access Engine.context without it being defined

So far, I can see WCV2 being initialized in Nav/App/index.js, which is a flow that is mounted post rehydration (onPersistComplete). At the same time, onPersistComplete is where Engine is initialized. Both happens in parallel and I suspect we're seeing the issue because WCV2 is initializing faster than the Engine being initialized. You can probably reproduce the same error message by wrapping EngineService.initalizeEngine(store); in a timer.

from metamask-mobile.

abretonc7s avatar abretonc7s commented on July 21, 2024

Hey @Cal-L , I was just looking at it with Chris

For the init flow:

  • store initialize
  • onPersistComplete is triggered
  • Engine initializes via EngineService.initalizeEngine(store);
  • ConnectedRoot opens Nav/App/Index.js (after engine has initialized)
  • WalletConnectV2::init() is triggered

I don't think it is wallet connect / sdk related.

Any other ideas?

from metamask-mobile.

sentry-io avatar sentry-io commented on July 21, 2024

Sentry Issue: METAMASK-MOBILE-29SX

from metamask-mobile.

Cal-L avatar Cal-L commented on July 21, 2024

@abretonc7s @christopherferreira9 Digging into a bit more, we found that to be the case as well. The WC message is just for initialization. I will reassign this to platform for now. Thanks for the investigation!

from metamask-mobile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.