Ошибка platform exception

I have also recently faced this error and, I have found out that the .catchError() callback wasn’t being called in the debug mode (which is when you click the Run->Start Debugging button in VSCode).

However, when you type in flutter run -d , then, the .catchError() method gets called back as it is not in debug mode.

To get your preferred simulator’s code paste this line of code in the terminal:

instruments -s devices

If that doesn’t work, you can also try pasting this:

xcrun simctl list

The .catchError() method will get called unlike before and the code inside that will get executed as expected!

Additionally, the app won’t crash anymore with a PlatformException() and instead you will get a log like this one:

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'uid' was called on null.
Receiver: null

I have been facing this problem in Google Sign In too, in which the .catchError() was not being called!

In conclusion, if you have some error with handling errors in Firebase Authentication, you should first try to first run in through the terminal. Thanks, and I hope this helps and trust me, it should work for you!

Playing an audio file causes a Platform Exception Error.

Full Description
Playing an audio file _player.play('BG.mp3', mode: PlayerMode.LOW_LATENCY); causes a the following error.

Exception has occurred.
PlatformException (PlatformException(Unexpected error!, Operation is not supported for read-only collection, java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
at kotlin.collections.EmptyMap.put(Unknown Source:4)
at java.util.Collections$SynchronizedMap.put(Collections.java:2639)
at xyz.luan.audioplayers.WrappedSoundPool.setUrl(WrappedSoundPool.kt:247)
at xyz.luan.audioplayers.AudioplayersPlugin.handleMethodCall(AudioplayersPlugin.kt:62)
at xyz.luan.audioplayers.AudioplayersPlugin.onMethodCall(AudioplayersPlugin.kt:37)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loop(Looper.java:183)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
, null))

Code to Reproduce
Play any audio file with the play method.

Log Errors
Exception has occurred.
PlatformException (PlatformException(Unexpected error!, Operation is not supported for read-only collection, java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
at kotlin.collections.EmptyMap.put(Unknown Source:4)
at java.util.Collections$SynchronizedMap.put(Collections.java:2639)
at xyz.luan.audioplayers.WrappedSoundPool.setUrl(WrappedSoundPool.kt:247)
at xyz.luan.audioplayers.AudioplayersPlugin.handleMethodCall(AudioplayersPlugin.kt:62)
at xyz.luan.audioplayers.AudioplayersPlugin.onMethodCall(AudioplayersPlugin.kt:37)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loop(Looper.java:183)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
, null))

Platforms
Android only.

Flutter Doctor Output

[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-US)

[✓] Android toolchain — develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode — develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.52.1)
[✓] Connected device (2 available)
! Error: iPhone is busy: Copying cache files from device. Xcode will continue when Paul’s iPhone is finished. (code -10)

! Doctor found issues in 1 category.
immergenmac2@Pauls-MacBook-Pro mobile-flutter-afx2020 % flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-US)
• Flutter version 1.22.6 at /Users/development/flutter
• Framework revision 9b2d32b605 (11 days ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5

[✓] Android toolchain — develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/immergenmac2/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode — develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality. (FYI this is know VScode issue with Flutter doctor has always been this way even when build was working).
✗ Dart plugin not installed; this adds Dart specific functionality. (FYI this is know VScode issue with Flutter doctor has always been this way even when build was working).
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0

Thrown to indicate that a platform interaction failed in the platform
plugin.

See also:

  • MethodCodec, which throws a PlatformException, if a received result
    envelope represents an error.
  • MethodChannel.invokeMethod, which completes the returned future
    with a PlatformException, if invoking the platform plugin method
    results in an error envelope.
  • EventChannel.receiveBroadcastStream, which emits
    PlatformExceptions as error events, whenever an event received from the
    platform plugin is wrapped in an error envelope.
Implemented types
  • Exception

Constructors

PlatformException({required String code, String? message, dynamic details, String? stacktrace})
Creates a PlatformException with the specified error code and optional
message, and with the optional error details which must be a valid
value for the MethodCodec involved in the interaction.

Properties

code
→ String

An error code.

final

details
→ dynamic

Error details, possibly null.

final

hashCode
→ int

The hash code for this object.

read-onlyinherited

message
→ String?

A human-readable error message, possibly null.

final

runtimeType
→ Type

A representation of the runtime type of the object.

read-onlyinherited

stacktrace
→ String?

Native stacktrace for the error, possibly null.

final

Methods

noSuchMethod(Invocation invocation)
→ dynamic

Invoked when a nonexistent method or property is accessed.

inherited

toString()
→ String

A string representation of this object.

override

Operators

operator ==(Object other)
→ bool

The equality operator.

inherited

These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Platform Exception Error

Registered: Jan 15 2007

Posts: 4

Hello All,

 
I am a new user in the Acrobat world.

 
I currently have Acrobat Pro 7.o installed for a few months.

 
I have been using the digital signature option without any problem till 2-3 weeks ago.

 
Then suddenly, I am unable to use the digital signature option. The product allows me up to the point of creating the box for placing the digital signature and in the next step gives me the following error:

 
**********
Creation of this signature could not be completed.

 
Platform Exception
Object already exists.
Error Code: 2148073487
************
I am unable to get any info from the website.

 
Any and all help is deeply appreciated.

 
Thanks

 
Sunil

My Product Information:
Acrobat Pro 7, Windows

jp98

answered on
January 2, 2023

Popularity
8/10

Helpfulness
2/10


[error:flutter/runtime/dart_vm_initializer.cc(41)] unhandled exception: platformexception(null-error, host platform returned null value for non-null return value., null, null)


Popularity

8/10 Helpfulness
2/10
Language
whatever

jp98

Contributed on Jan 02 2023

jp98

0 Answers  Avg Quality 2/10


Closely Related Answers

This error occurs because of this `options: DefaultFirebaseOptions.currentPlatform,` not added into `initializeApp()`


Popularity

3/10 Helpfulness
4/10
Language
whatever

Mayura Sandakalum


Понравилась статья? Поделить с друзьями:
  • Ошибка plants vs zombies battle for neighborville
  • Ошибка sam митсубиси фусо
  • Ошибка pkgj 0x80103a01
  • Ошибка s33 на котле вайлант
  • Ошибка pkg на пс3