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

Xcode build fails due to null check #53

Open
jayjay21redball opened this issue Aug 2, 2023 · 1 comment
Open

Xcode build fails due to null check #53

jayjay21redball opened this issue Aug 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jayjay21redball
Copy link

jayjay21redball commented Aug 2, 2023

This issue has been bugging us since beginning of June. Had to manually update the code from pub-cache to be able to get a build, then had to update our CI scripts to manually change content, too.

/Users/local/.pub-cache/hosted/pub.dartlang.org/onboarding_overlay-3.2.1/lib/src/onboarding_widget.dart:121:12: Error: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null.
 - 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/Users/local/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Try calling using ?. instead.
          .insert(_overlayEntry);
           ^^^^^^
/Users/local/.pub-cache/hosted/pub.dartlang.org/onboarding_overlay-3.2.1/lib/src/onboarding_widget.dart:131:12: Error: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null.
 - 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/Users/local/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Try calling using ?. instead.
          .insert(_overlayEntry);
           ^^^^^^
/Users/local/.pub-cache/hosted/pub.dartlang.org/onboarding_overlay-3.2.1/lib/src/onboarding_widget.dart:142:12: Error: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null.
 - 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/Users/local/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Try calling using ?. instead.
          .insert(_overlayEntry);
           ^^^^^^
Failed to package /Volumes/workspace/repository.
Command PhaseScriptExecution failed with a nonzero exit code

flutter doctor -v

[✓] Flutter (Channel stable, 3.3.9, on macOS 13.2.1 22D68 darwin-arm, locale en-TR)
    • Flutter version 3.3.9 on channel stable at /Users/altop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (8 months ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/altop/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • Java binary at: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_351-b10)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

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

[!] Android Studio (version 2022.1)
    • 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
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 115.0.5790.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
@talamaska
Copy link
Owner

talamaska commented Aug 2, 2023

please post your flutter doctor and minimum code for reproducing. You could also fork the repo, make the changes, push, replace the source of the package to github url in pubspec, create a PR.

@talamaska talamaska added the bug Something isn't working label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants