Open RobinSun8 opened 1 month ago
Hey @RobinSun8!
Did you follow all the steps closely (you must use NodeJS version 14 or higher)? I tested the code again and it runs fine for me, meaning that all functions inside the SDK are still working as expected.
I can't say for sure without seeing your code, but it looks like you might not be awaiting the api
. The api
object is initialized asynchronously using await activate()
. Check if activate()
completes successfully and returns a valid API instance. You can add a debug log after api = await activate()
; to confirm the successful activation.
For example, you can try something like this to confirm it:
(async () => { try { api = await activate(); console.log('API activated:', api); } catch (error) { console.error('Failed to activate API:', error); } })();
Feel free to push your code and shoot me a link, I'd be happy to help you debug.
Hey @RobinSun8!
Did you follow all the steps closely (you must use NodeJS version 14 or higher)? I tested the code again and it runs fine for me, meaning that all functions inside the SDK are still working as expected.
I can't say for sure without seeing your code, but it looks like you might not be awaiting the
api
. Theapi
object is initialized asynchronously using awaitactivate()
. Check ifactivate()
completes successfully and returns a valid API instance. You can add a debug log afterapi = await activate()
; to confirm the successful activation.For example, you can try something like this to confirm it:
(async () => { try { api = await activate(); console.log('API activated:', api); } catch (error) { console.error('Failed to activate API:', error); } })();
Feel free to push your code and shoot me a link, I'd be happy to help you debug.
Hi! thank u for your reply,
My code is the same as this repo, and the node version and related packages are confirmed to be OK. After npm start
, there will be an error API-WS: disconnected from wss://rpc-0.gemini-3h.subspace.network/ws: 1006:: Abnormal Closure
I think it may be because of network problems? But when I access rpc-0.gemini-3h.subspace.network/ws
directly in the address bar of chrome, it seems that I can access it. like this
I also tried using other ports to avoid possible proxy issues. Although I haven't found the root of the problem yet, I still think it may be due to network problems.
My code has been temporarily submitted to the dev branch of git@github.com:RobinSun8/space-race-plot-o-meter.git. You can debug it if it is convenient for you.
In addition, the design style can only change existing elements, or can I add or change page elements, such as using canvas?
Thank you again for your reply.
Thank you for providing more details! I can't see the reason why it's not running on your machine, given that there are no code changes in your repo 🤔
There is a chance that your provider or firewall is blocking the connection, I can't think of any other reason if you confirmed that all packages and the required nodejs version were installed properly.
In addition, the design style can only change existing elements, or can I add or change page elements, such as using canvas?
Feel free to be creative and add canvases, additional pages, any new page elements - it's up to you! I hope that you resolve the issues and get the application running!
Error Message:
![Uploading image.png…]()
I tried the 0.6.5 version of the package, but it didn’t work. I also tried upgrading "@autonomys/auto-consensus" and "@autonomys/auto-utils" packages to the latest 0.6.7 version, but it still didn’t work. Is the node normal? how can i solve this problem?