Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException recreating_view #811

Open
jnorkus opened this issue Dec 16, 2024 · 7 comments
Open

PlatformException recreating_view #811

jnorkus opened this issue Dec 16, 2024 · 7 comments

Comments

@jnorkus
Copy link

jnorkus commented Dec 16, 2024

After upgrading to Flutter 3.27.0 I am getting this error on an iOS simulator (haven't tested on a device) after hot restarting. Also, the map view does not properly load.

Unhandled Exception: PlatformException(recreating_view, trying to create an already created view, view id: '0', null)

@evil159
Copy link
Contributor

evil159 commented Dec 19, 2024

Hi @jnorkus, I can't reproduce the issue with Flutter 3.27, could you share a code snippet?

@MPinto16
Copy link

Hi! I’m also experiencing the same issue after upgrading to Flutter 3.27.0, specifically when performing a hot restart on the iOS simulator.

flutter: ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
flutter: The following PlatformException was thrown:
flutter: PlatformException(recreating_view, trying to create an already created view, view id: '0', null)
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:646:7)
flutter: #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
flutter: <asynchronous suspension>
flutter: #2      PlatformViewsService.initUiKitView (package:flutter/src/services/platform_views.dart:248:5)
flutter: <asynchronous suspension>
flutter: #3      _DarwinViewState._createNewUiKitView (package:flutter/src/widgets/platform_view.dart:921:36)
flutter: <asynchronous suspension>
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

@jnorkus
Copy link
Author

jnorkus commented Dec 19, 2024

Hi @jnorkus, I can't reproduce the issue with Flutter 3.27, could you share a code snippet?

I was able to reproduce using the example project.

  1. Run on iOS simulator
  2. Go to "Display a simple map"
  3. Do a hot restart
  4. Go to "Display a simple map"

@evil159
Copy link
Contributor

evil159 commented Dec 19, 2024

@jnorkus thank you for the clarification, still no luck on my side replicating this, could you share iOS and Xcode version you are using?

@jnorkus
Copy link
Author

jnorkus commented Dec 20, 2024

@jnorkus thank you for the clarification, still no luck on my side replicating this, could you share iOS and Xcode version you are using?

iOS 17.2
Xcode 15.2

I'll try upgrading my macOS to get the latest version of Xcode and see if that helps.

@jnorkus
Copy link
Author

jnorkus commented Dec 23, 2024

Same results on:
iOS 18.2
Xcode 16.2

Reproducable on the example app in this repo as before. Please note that you have to do a hot restart (not hot reload).

@ludovicjamet
Copy link

I got the same issue, and just so you know downgrading to flutter v3.24.5 solved the issue. Do you need help to reproduce @evil159?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants