wakelock_plus icon indicating copy to clipboard operation
wakelock_plus copied to clipboard

Unhandled Exception: FormatException: Message corrupted

Open matteopapiani-mw opened this issue 11 months ago • 2 comments

Hi, I'm currently using version 1.2.4 of WakeLockPlus in my project. Recently, it stopped working and I've got this exception:

E/flutter (12964): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Message corrupted
E/flutter (12964): #0      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:532:16)
E/flutter (12964): #1      _PigeonCodec.readValueOfType (package:wakelock_plus_platform_interface/messages.g.dart:99:22)
E/flutter (12964): #2      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
E/flutter (12964): #3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:522:23)
E/flutter (12964): #4      _PigeonCodec.readValueOfType (package:wakelock_plus_platform_interface/messages.g.dart:99:22)
E/flutter (12964): #5      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
E/flutter (12964): #6      StandardMessageCodec.decodeMessage (package:flutter/src/services/message_codecs.dart:341:28)
E/flutter (12964): #7      BasicMessageChannel.send (package:flutter/src/services/platform_channel.dart:218:18)
E/flutter (12964): <asynchronous suspension>
E/flutter (12964): #8      WakelockPlusApi.isEnabled (package:wakelock_plus_platform_interface/messages.g.dart:153:9)
E/flutter (12964): <asynchronous suspension>
E/flutter (12964): #9      MethodChannelWakelockPlus.enabled (package:wakelock_plus_platform_interface/src/method_channel_wakelock_plus.dart:10:21)

The problem was that the version of the wakelock_plus_platform_interface was incorrectly upgraded to 1.2.2 instead of 1.2.1. Downgrading the package to 1.2.1 fixed the problem.

matteopapiani-mw avatar Jan 13 '25 16:01 matteopapiani-mw

Can confirm, I have the same problem

roberto-gigli avatar Jan 13 '25 17:01 roberto-gigli

@matteopapiani-mw please upgrade your wakelock_plus dependencies to the latest version. Thanks.

diegotori avatar Jan 15 '25 19:01 diegotori