onflow / fcl-dev-wallet

A Flow wallet for development purposes. To be used with the Flow Emulator.
Apache License 2.0
51 stars 34 forks source link

Initialization failed: Invalid Flow argument: transaction with ID has already been submitted #175

Closed bartolomej closed 1 year ago

bartolomej commented 1 year ago

Description

Sometimes when you trigger authentication (via fcl-js authenticate() call) fcl-dev-wallet fails to initialize with the bellow message:

image

Error in text:

    Dev wallet initialization failed: HTTP Request Error: 
          HTTP Request Error: An error occurred when interacting with the Access API.
          transport=FetchTransport

          hostname=http://localhost:8888
          path=/v1/transactions
          method=POST
          requestBody={"script":"dHJhbnNhY3Rpb24oY29kZTogU3RyaW5nLCBrZXk6IFN0cmluZywgaW5pdEFjY291bnRzTGFiZWxzOiBbU3RyaW5nXSkgewogIHByZXBhcmUoYWNjdDogQXV0aEFjY291bnQpIHsKICAgIGFjY3QuY29udHJhY3RzLmFkZChuYW1lOiAiRkNMIiwgY29kZTogY29kZS5kZWNvZGVIZXgoKSwga2V5OiBrZXksIGluaXRBY2NvdW50c0xhYmVsczogaW5pdEFjY291bnRzTGFiZWxzKQogIH0KfQo=","arguments":["eyJ0eXBlIjoiU3RyaW5nIiwidmFsdWUiOiI3MDc1NjIyMDYzNmY2ZTc0NzI2MTYzNzQyMDQ2NDM0YzIwN2IwYTIwMjA3MDc1NjIyMDZjNjU3NDIwNzM3NDZmNzI2MTY3NjU1MDYxNzQ2ODNhMjA1Mzc0NmY3MjYxNjc2NTUwNjE3NDY4MGEwYTIwMjA3MDc1NjIyMDczNzQ3Mjc1NjM3NDIwNDE2MzYzNmY3NTZlNzQyMDdiMGEyMDIwMjAyMDcwNzU2MjIwNmM2NTc0MjA3NDc5NzA2NTNhMjA1Mzc0NzI2OTZlNjcwYTIwMjAyMDIwNzA3NTYyMjA2YzY1NzQyMDYxNjQ2NDcyNjU3MzczM2EyMDQxNjQ2NDcyNjU3MzczMGEyMDIwMjAyMDcwNzU2MjIwNmM2NTc0MjA2YjY1Nzk0OTY0M2EyMDQ5NmU3NDBhMjAyMDIw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load_signatures":[],"envelope_signatures":[{"address":"f8d6e0586b0a20c7","key_index":"0","signature":"80M3t/80O8njIcSUwKxu2CelAsicyvixIVZB8AhPoomleN9gCv1/vK4hmjjPcqAMmAHe+pEzj4ci782Y6/dT8w=="}]}
          responseBody={"code":400,"message":"Invalid Flow argument: transaction with ID fc6f5cc4bdd7120fbaed57a358aad8a0be75366208c07de0de67dffffb7cb612 has already been submitted"}
          responseStatusText=Bad Request

          statusCode=400

Authentication succeeds (the error is now shown) it works in all subsequent attempts.

Steps to reproduce

  1. Install the latest version (v0.42.2) of Flow CLI (which also includes the latest version of fcl-dev-wallet)

    sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v0.42.2
  2. Create an empty flow project and initialize it with flow init

  3. Change directory to your project dir and run Flowser with flow flowser

  4. When Flow CLI opens the current project in Flowser, open the sidebar and click "Connect wallet"

  5. This error might not appear every time, so try re-opening Flowser until you encounter this error

bartolomej commented 1 year ago

I think this (or some other error) was also causing the modal to not get shown, which was fixed in the scope of https://github.com/onflow/fcl-dev-wallet/issues/154.