polkawallet-io / app

[Main] Polkawallet app.
https://polkawallet.io
Apache License 2.0
153 stars 71 forks source link

TypeError: Cannot read property 'keyring' of null #45

Closed peter-jim closed 2 years ago

peter-jim commented 3 years ago

I had meet some problem!! please help

======== Exception caught by widgets library ======================================================= LateInitializationError: Local 'built' has not been initialized. The relevant error-causing widget was: Observer file:///D:/android%20flutter/app/app/lib/pages/account/create/backupAccountPage.dart:37:12

TypeError: Cannot read property 'keyring' of null

======== Exception caught by flutter_mobx ========================================================== The following MobXCaughtException was thrown: NoSuchMethodError: invalid member on null: 'keyring'

my flutter and dart version is correctly.it is sdk wrong?

RomeroYang commented 3 years ago

This repo is not a common development tool, you should offer more context before we can help.

Are you developing a plugin with polkawallet_sdk or planning to contribute to the wallet App?

peter-jim commented 3 years ago

yeah! my team member planning to develop the wallet App ,which will participate the hackathon. So we need a wallet.

I‘m using ‘App’ repo, Androidstudio try to develop.And run it in chrome(web)

This application is not configured to build on the web. To add web support to a project, run flutter create .. Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... This app is linked to the debug service: ws://127.0.0.1:64577/DGoLmmk1tt4=/ws Debug service listening on ws://127.0.0.1:64577/DGoLmmk1tt4=/ws

Running with unsound null safety For more information see https://dart.dev/null-safety/unsound-null-safety Debug service listening on ws://127.0.0.1:64577/DGoLmmk1tt4=/ws No observables detected in the build method of Observer packages/app/app.dart 363:13 XMLHttpRequest error. js update: polkadot 20601 11201 10011 Error: Unsupported operation: Platform.operatingSystem at Object.throw [as throw] (http://localhost:64518/dart_sdk.js:5348:11) at Function._operatingSystem (http://localhost:64518/dart_sdk.js:56559:17) at Function.get operatingSystem [as operatingSystem] (http://localhost:64518/dart_sdk.js:56605:27) at get _operatingSystem (http://localhost:64518/dart_sdk.js:56518:27) at Function.desc.get [as _operatingSystem] (http://localhost:64518/dart_sdk.js:5853:17) at get isAndroid (http://localhost:64518/dart_sdk.js:56539:26) at Function.desc.get [as isAndroid] (http://localhost:64518/dart_sdk.js:5853:17) at checkUpdate (http://localhost:64518/packages/app/utils/UI.dart.lib.js:1110:56) at checkUpdate.next () at runBody (http://localhost:64518/dart_sdk.js:39250:34) at Object._async [as async] (http://localhost:64518/dart_sdk.js:39281:7) at Function.checkUpdate (http://localhost:64518/packages/app/utils/UI.dart.lib.js:1109:20) at app$._WalletAppState.new._checkUpdate (http://localhost:64518/packages/app/app.dart.lib.js:1712:18) at _checkUpdate.next () at http://localhost:64518/dart_sdk.js:39230:33 at _RootZone.runUnary (http://localhost:64518/dart_sdk.js:39087:58) at _FutureListener.thenAwait.handleValue (http://localhost:64518/dart_sdk.js:34073:29) at handleValueCallback (http://localhost:64518/dart_sdk.js:34633:49) at Function._propagateToListeners (http://localhost:64518/dart_sdk.js:34671:17) at _Future.new.[_completeWithValue] (http://localhost:64518/dart_sdk.js:34513:23) at async._AsyncCallbackEntry.new.callback (http://localhost:64518/dart_sdk.js:34536:35) at Object._microtaskLoop (http://localhost:64518/dart_sdk.js:39374:13) at _startMicrotaskLoop (http://localhost:64518/dart_sdk.js:39380:13) at http://localhost:64518/dart_sdk.js:34887:9 js file loaded

======== Exception caught by flutter_mobx ========================================================== The following MobXCaughtException was thrown: NoSuchMethodError: invalid member on null: 'keyring'

When the exception was thrown, this was the stack: packages/app/pages/account/create/backupAccountPage.dart 94:58 packages/flutter_mobx/src/observer.dart 43:48 build packages/flutter/src/widgets/framework.dart 4648:28 build packages/flutter_mobx/src/observer_widget_mixin.dart 77:21 packages/mobx/src/core/context.dart 250:20 trackDerivation ...

TypeError: Cannot read property 'keyring' of null at apiAccount.ApiAccount.new.generateAccount (http://localhost:64518/packages/app/service/apiAssets.dart.lib.js:216:59) at generateAccount.next () at runBody (http://localhost:64518/dart_sdk.js:39250:34) at Object._async [as async] (http://localhost:64518/dart_sdk.js:39281:7) at apiAccount.ApiAccount.new.generateAccount (http://localhost:64518/packages/app/service/apiAssets.dart.lib.js:215:20) at backupAccountPage._BackupAccountPageState.new.initState (http://localhost:64518/packages/app/pages/account/create/backupAccountPage.dart.lib.js:1463:35) (http://localhost:64518/packages/flutter/src/widgets/widget_span.dart.lib.js:46145:31)


If I use my cell phone,it show error like this

FAILURE: Build failed with an exception.

RomeroYang commented 3 years ago

This app can not run in web, it has several dependencies calling Android/IOS native libs through message channels.

Try https://polkadot.js.org/ Chrome extension for hackthon development.

peter-jim commented 3 years ago

thank you! finally I get the following bug

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1