@kadena/client : pollCreateSpv is throwing errors in console

Please confirm the following:

[X] I have read the Code of Conduct
[X] The bug was not reported before
[X] I am using the latest version of the relevant package(s)

What operating system are you using? And what version?
Linux
What environment or browser are you using? And what version?
Node.js and Chrome
What package is the bug report about?
@kadena/client
Describe the bug
I use the method pollCreateSpv() to retrieve conveniently a Merkle proof, while retrying until a given timeout.
But if the SPV is not mature (this is supposed to be the case when you call a poll function), expected errors thrown by the node are not caught and are shown in the console.
As a developer, I expect and ignore these errors. But from an end-user point of view, this could be a concern, as the user may think that something is going wrong.

NOTE:
I have not tested, but I suppose we have a similar behavior withpollStatus()
Steps to reproduce the behavior
Call pollCreateSpv() with a not already mined txHash or not mature enough X-chain txHash.
What did you expect to happen?
I would expect to have no errors shown in the console until timeout is reached.
Participation

[ ] I am willing to submit a pull request for this issue.

I'll have a look

Thank you for reporting the issue.
Just merged PR #1624 that fixes the issue

@CryptoPascal31 does everything look good from your end after merging https://github.com/kadena-community/kadena.js/pull/1624?

@LindaOrtega
PR looks good, but I need to test to definitively confirm that it works as expected...

@LindaOrtega PR looks good, but I need to test to definitively confirm that it works as expected...

We have released the new version, please check it works as expected
https://www.npmjs.com/package/@kadena/client

@LindaOrtega @javadkh2
I confirm: it's fixed. Thank you.


ImagerJs autoload image

I want to automatically load image. That means when user open the page, and the image directly show in the edit status.
write in JS:
var fileSelector = new ImagerJs.util.FileSelector('image/*');
fileSelector.parseFile(blob);  //blob is the file
But nothing happened, no error showed. What the next step should I do?

I want to automatically load image. That means when user open the page, and the image directly show in the edit status.
write in JS:
var fileSelector = new ImagerJs.util.FileSelector('image/*'); fileSelector.parseFile(blob); //blob is the file
But nothing happened, no error showed. What the next step should I do?

I've the same problem.


Drag & drop of local pcap when connected to remote Workspace

While updating the Brim "Remote Zed Lakes" article in prep for the release of Brim v0.25.0, I was experiencing the current user experience if they're connected to a remote Workspace and attempt to drag a pcap into the app. At the moment this gives the following error message:

This made me realize it would not be too much of a stretch for the app to support this use case by:

Creating the remote Pool if it doesn't already exist
Running brimcap analyze to generate the logs based on the pcap and commit them to the remote Pool
Run brimcap index to populate the index in the user's local Brimcap root

This would make it such that the user could query the remote logs but still extract flows from the local pcap whenever they need to. Other users that may be accessing the same remote Workspace could potentially do the same if they did their own run of brimcap index against a locally-held copy of the same pcap.

Note that issue is linked to from the "Remote Workspaces (v0.25.0+)" article in the Brim wiki. If/when this gets addressed, the article should be updated.


PM2 doesn't seem to work with Fresh

https://github.com/denoland/fresh/assets/9645145/b9b99264-561e-441e-94dd-4b9dacb23f9b
In this video, the app works. Half way through the video, I ran a command in terminal like this:
deno task build && pm2 start main.ts --name=\"APP NAME\" --interpreter=\"deno\" --interpreter-args=\"run -A main.ts\" && pm2 save basically using PM2 to serve main.ts. That's when the app crashes.
Able to duplicate 100% by deploying a new build using PM2 to serve main.ts.
Cannot duplicate if deploying a new build WITHOUT PM2 to serve main.ts manually.
I cannot read deduce if this error is coming from Fresh, or a Socket.io or possibly my code, but reading the production minified code, I don't think it's my code. I could be wrong though.
I'd like to investigate this error more by deploying using PM2. the dev.ts file instead. But I can't, because serving dev.ts causes the browser to refresh on reconnect to $fresh. So I need some way to disable initial app refresh when dev.ts runs.
If someone understands why PM2 causes Deno Fresh to break, I'd like some input.

What are the steps needed to reproduce the error on our machines?

What are the steps needed to reproduce the error on our machines?

Before that, I would really like to know how I can disable initial browser refresh (NOT hot code refreshes) in dev.ts so I can deploy dev.ts and see the error in non-minified version.

Steps to reproduce:

Create a signal() as a constant, outside a React component (might be duplicatable using useSignal() too)
Route somewhere and attempt to go back.
It will crash either when you route or when you press back.

https://github.com/saeho/fresh-signal-bug

More tests have allowed me to deduce that this is caused by Signals, possibly global constant signals, but might be duplicatable using useSignal() too.
I need to see the error in non-minified form to get more info, but dev.ts makes that impossible with initial browser refresh.

Before that, I would really like to know how I can disable initial browser refresh (NOT hot code refreshes) in dev.ts so I can deploy dev.ts and see the error in non-minified version.

Just a drive-by suggestion, but is your issue that the devtools console is getting cleared because of the refresh? Both FireFox and Chrome (and I'd imagine Safari too) have an option in the devtools to persist logs which you can enable to get around this.

Before that, I would really like to know how I can disable initial browser refresh (NOT hot code refreshes) in dev.ts so I can deploy dev.ts and see the error in non-minified version.

Just a drive-by suggestion, but is your issue that the devtools console is getting cleared because of the refresh? Both FireFox and Chrome (and I'd imagine Safari too) have an option in the devtools to persist logs which you can enable to get around this.

Thank you, I can't believe I didn't know about this option before.
Well, after looking into it it's a default "WebSocket connection to _frsh/alive failed" which is normal since the old fresh app died.
In development, this isn't an issue because the app is force refreshed by dev script. But in production this is an issue because the app does not force refresh, causing existing users to be stranded.
I actually think this is a Signal related issue because I was able to reproduce it with minimal code base in the repo I attached above.

Reproduced without PM2, using a single line of code.
https://github.com/denoland/fresh/issues/2564

More info/discussion in this PreactJS Signal thread: https://github.com/preactjs/signals/issues/581