Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

graceful failure for web? #96

Open
wilpar opened this issue Mar 22, 2022 · 0 comments
Open

graceful failure for web? #96

wilpar opened this issue Mar 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@wilpar
Copy link

wilpar commented Mar 22, 2022

It makes sense that this error will show up on web, but other than wrapping the package in kIsWeb, is there another more graceful way to avoid a problem?

Thanks

currently solving with

    if (!kIsWeb) {
      checkVersion();
    }
Error: Unsupported operation: Platform._operatingSystem
    at Object.throw_ [as throw] (http://localhost:58494/dart_sdk.js:5067:11)
    at Function._operatingSystem (http://localhost:58494/dart_sdk.js:57544:17)
    at Function.get operatingSystem [as operatingSystem] (http://localhost:58494/dart_sdk.js:57590:27)
    at get _operatingSystem (http://localhost:58494/dart_sdk.js:57503:27)
    at Function.desc.get [as _operatingSystem] (http://localhost:58494/dart_sdk.js:5560:17)
    at get isIOS (http://localhost:58494/dart_sdk.js:57527:26)
    at Function.desc.get [as isIOS] (http://localhost:58494/dart_sdk.js:5560:17)
    at new_version.NewVersion.new.getVersionStatus
    (http://localhost:58494/packages/new_version/new_version.dart.lib.js:293:25)
    at getVersionStatus.next (<anonymous>)
    at http://localhost:58494/dart_sdk.js:40571:33
    at _RootZone.runUnary (http://localhost:58494/dart_sdk.js:40441:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:58494/dart_sdk.js:35363:29)
    at handleValueCallback (http://localhost:58494/dart_sdk.js:35931:49)
    at Function._propagateToListeners (http://localhost:58494/dart_sdk.js:35969:17)
    at _Future.new.[_completeWithValue] (http://localhost:58494/dart_sdk.js:35817:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:58494/dart_sdk.js:35838:35)
    at Object._microtaskLoop (http://localhost:58494/dart_sdk.js:40708:13)
    at _startMicrotaskLoop (http://localhost:58494/dart_sdk.js:40714:13)
    at http://localhost:58494/dart_sdk.js:36191:9
@timtraversy timtraversy added the enhancement New feature or request label Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants