Skip to content

graceful failure for web? #96

@wilpar

Description

@wilpar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions