#isReady never finishes

15 messages · Page 1 of 1 (latest)

faint willow
#

I am using the base project from "", modified with the zkApp I am developing. However, when I run on the browser, it remains stuck in the "isReady" check:

console.log('Loading SnarkyJS...');     
await zkAppWorkerClient.loadSnarkyJS();
console.log('done');

It does not continue to the donesection. Does anyone know how to debug the library to identify where the problem is and why it does not continue??

hollow solar
#

that call ends up with an await for the isReady promise which resolves when SnarkyJS is ready to be used. So, the problem is probably that SnarkyJS is not loading or is taking too long to load.

Could you provide the following information?

  • run zk system and provide the output here
  • what does the console say when you try to run the zkApp?
viscid ravine
#

Which browser?

faint willow
faint willow
viscid ravine
#

The zkAppWorkerClient is from tutorial 4, right? And that tutorial should work AFAIK. So, would be interesting to identify where your project differs from the tutorial

#

I imagine it's a problem with how the workers are set up and not with snarkyjs

faint willow
faint willow
#

today I want to try to skim those sections and debug it part by part to see where it is failing

viscid ravine
#

yeah I recommend adding logs to the worker file to see if the workers are reached, and if snarkyjs finishes loading inside the worker

faint willow
#

I had to do that this weekend because I learned that I had to do "lazy loading" of the contract as suggested in this topic:
#1088851113530380408 message

#

otherwise, when requesting a new object of a MerkleTreeor MerkleMapit would simply fail with that self not defined

viscid ravine
#

Interesting, I wasn't aware of this problem, maybe it's something Next-specific

faint willow
#

possibly, searching the net, I found that many of the next.js projects would complain about