Skip to content

Issue on release mode. #5

@XlashDev

Description

@XlashDev

With 0.0.1 this library is working but when I run the exe file built again it spawns a hidden process, another one if you open it again and again.

So I tried upgrading in higher versions but it only works on debug mode. After I built it on windows or run in release mode this error shows.

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: type 'int' is not a subtype of type 'Map<String, dynamic>' #0 FlutterSingleInstance.isFirstInstance (package:flutter_single_instance/flutter_single_instance.dart:112) <asynchronous suspension>

this is the part of the lib its pointing to
_instance = Instance.fromJson(jsonDecode(data));

also tried to show the runTimeType but still give me error in release, but in the debug it is bool and is ok, so possible that its a lib issue?

logger.d((await FlutterSingleInstance().isFirstInstance()).runtimeType);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions