:: Abnormal Closure PORTABLEREGISTRY: Unable to determine runtime Call type

I got this error when i try to use any examples from here https://github.com/availproject/avail-js/tree/main/examples

$ npm start

> data-transfer@0.0.1 start
> tsc && node build/index.js

2023-11-27 13:01:59          API-WS: disconnected from wss://goldberg.avail.tools/ws: 1006:: Abnormal Closure
2023-11-27 13:02:04 PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic

Just spoke to the team. Seems like this is supposed to be more of a warning. Not an error. Could you please confirm?

my index.ts

import { initialize, getKeyringFromSeed } from "avail-js-sdk"

const main = async () => {
  try {
    const seed = "seed pharse which i have AVL" // Put a seed with some funds here
    const data = "Test App megumii"

    const api = await initialize()
    const keyring = getKeyringFromSeed(seed)
    const options = { app_id: 24, nonce: -1 }

    await api.tx.dataAvailability.submitData(data).signAndSend(keyring, options)

    process.exit(0)
  } catch (err) {
    console.error(err)
    process.exit(1)
  }
}
main()

how to change the default wss url? i want to try to use my own wss URL

even with ts-node it’s still give me the same result

$ ts-node src/index.ts
2023-11-27 15:06:53 PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic

Hey so i tried running this locally. It’s not an error. It’s just a warning. The data submission does go through successfully. Keep an eye on the explorer, and you’ll see your data submission transaction being included in the block.

We will try to modify the example code to show transaction result as well so it’s easier for users.

1 Like

Here is where we’ve defined the default WSS URL https://github.com/availproject/avail-js/blob/e980c60f653a7f6699342c2896c8d072009b87fe/src/chain/index.ts#L6

We made some changes for more visibility into the transaction status. Check it out here.

1 Like

yess it’s working, thank you
https://goldberg.avail.tools/#/explorer/query/0x82c32dba181716592cbda7d6ade7ef594992e8bd9eeceaea661ffa2147012b85

so for the transfer i just need to add that transaction status too?

Instead of changing the src file endpoint, you could add an argument when initializing the api
image (7)

1 Like

perfect! everything is answered, thank you for your response :saluting_face:

1 Like

and now i can track the tx id from submit data and transfer

1 Like