ion icon indicating copy to clipboard operation
ion copied to clipboard

Network Explorer hangs after DID not found

Open joshbooker opened this issue 4 years ago • 12 comments

Once I get DID not found in the Network Explorer, the page is stuck and I cannot change and search again until after refresh.

Steps:

  1. Search for: did:ion:EiClkZMDxPKqC9c-umQfTkR8vvZ9JPhl_xLDI9Nfk38w5w
  2. Success
  3. Search fordid:ion:EiClkZMDxPKqC9c-umQfTkR8vvZ9JPhl_xLDI9Nfk38w5
  4. Not Found
  5. Stuck - cannot search again must refresh

joshbooker avatar Mar 25 '21 17:03 joshbooker

@csuwildcat, can you take a look at this issue?

thehenrytsai avatar Mar 30 '21 02:03 thehenrytsai

@joshbooker I am not able to repro that, what exactly did you do? Did you copy/paste, or mod the input with the keyboard?

csuwildcat avatar Mar 30 '21 18:03 csuwildcat

@csuwildcat thanks for your reply.

I pasted the value in step 1 and it worked then deleted the last chr w keyboard and clicked the button.

Returned not found message then became non-responsive.

Firefox.

joshbooker avatar Mar 30 '21 19:03 joshbooker

GIF REPRO

400 response before hang is: { "code": "did_initial_state_jcs_is_not_json", "message": "Long form initial state should be encoded jcs." }

alt demo

joshbooker avatar Mar 30 '21 19:03 joshbooker

@joshbooker I do have code in that does not allow the back-to-back submission of the same DID URI, so if you don't change the string, it's not even going to attempt to do another lookup - could that be what this is?

csuwildcat avatar Mar 30 '21 21:03 csuwildcat

Yeah. It seems you cannot submit the same as the last successful URI regardless of whether they're be back-to-back.
Seems you can submit the same bad URI back-to-back but not the same successful URI again until you submit a different successful URI. Thanks.

joshbooker avatar Mar 31 '21 00:03 joshbooker

There may still be a bug, because any difference in URI should clear it. Let me test more now that I know the details of the issue.

On Tue, Mar 30, 2021, 5:26 PM Josh Booker @.***> wrote:

Yeah. It seems you cannot submit the same as the last successful URI regardless of whether they're be back-to-back. Seems you can submit the same bad URI back-to-back but not the same successful URI again until you submit a different successful URI. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/decentralized-identity/ion/issues/179#issuecomment-810664162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAFSSZ2PEFCCMILIHP7JDTGJT2XANCNFSM4ZZZUWHQ .

csuwildcat avatar Mar 31 '21 00:03 csuwildcat

Seems like the check that prevents back-to-back submissions fails if there is a 404 response, and the UI does not take that search into account. I opened a PR with a suggested (very simple) fix.

grankko avatar Apr 09 '21 17:04 grankko

I think you're right, after looking at your PR. I'll try to pull and test this weekend, and get it in.

csuwildcat avatar Apr 09 '21 18:04 csuwildcat

@joshbooker we accepted a PR that covers this, so can you let me know if you still see this happening?

csuwildcat avatar May 02 '21 23:05 csuwildcat

@csuwildcat it's fixed. Case closed. Thanks @grankko.

joshbooker avatar May 03 '21 14:05 joshbooker

I'm happy I could help!

grankko avatar May 03 '21 16:05 grankko