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

[Bug]: (device_info_plus) WebBrowser info is not extracted #3329

Open
8 tasks done
arrrrny opened this issue Oct 18, 2024 · 1 comment
Open
8 tasks done

[Bug]: (device_info_plus) WebBrowser info is not extracted #3329

arrrrny opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working triage

Comments

@arrrrny
Copy link
Contributor

arrrrny commented Oct 18, 2024

Platform

IOS 17.5

Plugin

device_info_plus

Version

11.1.0

Flutter SDK

3.24.3

Steps to reproduce

Teted on Physical Iphone 12 Pro Max, IOS simulator or Android Emulator can not receive webBrowserInfo. All receive below error:

I/flutter ( 5140): type 'BaseDeviceInfo' is not a subtype of type 'WebBrowserInfo' in type cast
I/flutter ( 5140): #0 DeviceInfoPlugin.webBrowserInfo (package:device_info_plus/device_info_plus.dart:79:62)

Code Sample

DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
    final webBrowserInfo = await deviceInfo.webBrowserInfo;
    print(webBrowserInfo);

Example app code has if(kIsWeb) so it is not receiving userAgent or webBrowser for Android or IOS it is misleading

Logs

[  +21 ms] Performing hot restart... (completed in 1,042ms)
[        ] Restarted application in 1,052ms.
[ +462 ms] I/flutter (10214): type 'BaseDeviceInfo' is not a subtype of type 'WebBrowserInfo' in type cast
[  +84 ms] D/EGL_emulation(10214): app_time_stats: avg=12059.76ms min=5.47ms max=36157.61ms count=3

Flutter Doctor

[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348
    darwin-arm64, locale en-TR)
    • Flutter version 3.24.3 on channel stable at
      /Users/arrrrny/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (5 weeks ago), 2024-09-11
      16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK
    version 35.0.0)
    • Android SDK at /Users/arrrrny/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/arrrrny/Library/Android/sdk
    • Java binary at:
      /opt/homebrew/Cellar/openjdk@17/17.0.12/libexec/openjdk.jdk/Con
      tents/Home/bin/java
    • Java version OpenJDK Runtime Environment Homebrew (build
      17.0.12+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google
      Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      21.0.3+-79915917-b509.11)

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

[✓] Connected device (6 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554
      • android-arm64  • Android 13 (API 33) (emulator)
    • ARRRRNY (mobile)                • 00008101-00115C381E10801E
      • ios            • iOS 18.0.1 22A3370
    • iPhone 15 (mobile)              •
      E80A1682-8841-46B5-BF4C-C0654237453B • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos
      • darwin-arm64   • macOS 15.0.1 24A348 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad
      • darwin         • macOS 15.0.1 24A348 darwin-arm64
    • Chrome (web)                    • chrome
      • web-javascript • Google Chrome 129.0.6668.101

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@arrrrny arrrrny added bug Something isn't working triage labels Oct 18, 2024
@StanleyCocos
Copy link

It seems that this is not a problem, it is just best to limit everyone's usage, but if you want to limit it, it will have a greater impact on previous versions, such as Future<WebBrowserInfo?> get webBrowserInfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants