question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPE in FlutterApp.hasServiceExtension

See original GitHub issue

I know little about cocoapods… but it is odd that it is trying to install flutter 1.0.0 dependency and the older version of the plugin im using… map_view 0.0.12 instead of 0.0.14

What happened

Running pod install… CocoaPods’ output: ↳ Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `map_view` from `.symlinks/plugins/map_view/ios`

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  A Flutter
  A GoogleMaps
  A map_view

Downloading dependencies

-> Installing Flutter (1.0.0)

-> Installing GoogleMaps (2.7.0)
  > Copying GoogleMaps from `/Users/joey/Library/Caches/CocoaPods/Pods/Release/GoogleMaps/2.7.0-f79af` to `Pods/GoogleMaps`

-> Installing map_view (0.0.12)
  - Running pre install hooks
[!] The 'Pods-Runner' target has transitive dependencies that include static binaries: (/Users/joey/Code/flutter/interactive_map/ios/Pods/GoogleMaps/Base/Frameworks/GoogleMapsBase.framework, /Users/joey/Code/flutter/interactive_map/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework, and /Users/joey/Code/flutter/interactive_map/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework)

/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:81:in `block (2 levels) in verify_no_static_framework_transitive_dependencies'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `block in verify_no_static_framework_transitive_dependencies'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:70:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:70:in `verify_no_static_framework_transitive_dependencies'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/target_validator.rb:36:in `validate!'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:415:in `validate_targets'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:118:in `install!'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods: ↳

[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Finished with error: Error running pod install

Version information

IntelliJ IDEA 2018.2.5 • Flutter plugin io.flutter 30.0.2 • Dart plugin 182.5124

Flutter 0.11.8 • channel beta • https://github.com/flutter/flutter.git Framework • revision f5b02e3c05 (25 hours ago) • 2018-11-20 07:49:29 -0800 Engine • revision 1baf081343 Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Exception

null

java.lang.NullPointerException
	at io.flutter.run.daemon.FlutterApp.hasServiceExtension(FlutterApp.java:447)
	at io.flutter.perf.FlutterWidgetPerfManager.syncBooleanServiceExtension(FlutterWidgetPerfManager.java:226)
	at io.flutter.perf.FlutterWidgetPerfManager.debugActive(FlutterWidgetPerfManager.java:180)
	at io.flutter.perf.FlutterWidgetPerfManager.lambda$new$0(FlutterWidgetPerfManager.java:87)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:426)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:387)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:376)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:364)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:357)
	at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:43)
	at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:208)
	at com.sun.proxy.$Proxy144.debugActive(Unknown Source)
	at io.flutter.view.FlutterViewMessages.sendDebugActive(FlutterViewMessages.java:45)
	at io.flutter.run.FlutterDebugProcess.onVmConnected(FlutterDebugProcess.java:64)
	at io.flutter.server.vmService.DartVmServiceDebugProcess.onConnectSucceeded(DartVmServiceDebugProcess.java:585)
	at io.flutter.server.vmService.DartVmServiceDebugProcess.lambda$scheduleConnect$2(DartVmServiceDebugProcess.java:296)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JccEcommented, Nov 21, 2018

@pq Thank you for your quick response!

0reactions
devoncarewcommented, Jan 15, 2019

I believe this particular NPE:

java.lang.NullPointerException
	at io.flutter.run.daemon.FlutterApp.hasServiceExtension(FlutterApp.java:447)

has been addressed; we can re-investigate if we see additional reports.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flutter build aar failed with NPE · Issue #62176 - GitHub
You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed...
Read more >
java.lang.NullPointerException (no error message)
I've deleted .gradle folder from the project and was able to rebuild it again. ... compile 'com.google.android.gms:play-services-location:9.4.0' compile ...
Read more >
Add Flutter to existing app
Add to Android applications · Auto-build and import the Flutter module by adding a Flutter SDK hook to your Gradle script. · Build...
Read more >
Non-Nullable Dart: Understanding Null Safety - Kodeco
In this tutorial, you'll build ProfileApp, a small app that saves data about users and their relationships. In the process, you'll learn about:....
Read more >
Android Studio Dolphin | 2021.3.1
Android Studio is the official IDE for Android development, and includes everything you need to build Android apps. This page lists new features...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found