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

[Service took too long to process intent] FirebaseMessaging #2181

Closed
mudi256 opened this issue Mar 16, 2020 · 7 comments
Closed

[Service took too long to process intent] FirebaseMessaging #2181

mudi256 opened this issue Mar 16, 2020 · 7 comments
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) type: bug Something isn't working

Comments

@mudi256
Copy link

mudi256 commented Mar 16, 2020

Flutter firebaseMessaging issue data Notification not received when app is in background not terminated, further "onMessage" is not triggered.

D/FlutterNativeView(17720): FlutterView.send called on a detached view, channel=plugins.flutter.io/firebase_database
W/FirebaseInstanceId(17720): Service took too long to process intent: com.google.android.c2dm.intent.RECEIVE App may get closed.

flutter Channel stable, v1.12.13+hotfix.8
Screenshot 2020-03-17 at 1 29 10 AM
Screenshot 2020-03-17 at 1 29 48 AM

@mudi256 mudi256 added the type: bug Something isn't working label Mar 16, 2020
@iapicca
Copy link

iapicca commented Mar 20, 2020

Hi @mudi256
can you please provide your flutter run --verbose,
your pubspec.yaml
and if possible a reproducible minimal code sample.

Please refrain from posting pictures if not necessary.
Thank you

possibly related to #1590

@iapicca iapicca added blocked: customer-response Waiting for customer response, e.g. more information was requested. impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) labels Mar 20, 2020
@mudi256
Copy link
Author

mudi256 commented Mar 23, 2020

Muhammads-MBP:north_messaging muhammadmudassar$ flutter run --verbose
[ +32 ms] executing: [/Users/muhammadmudassar/Documents/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +62 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 0b8abb4724aa590dd0f429683339b1e045a1594d
[ ] executing: [/Users/muhammadmudassar/Documents/flutter/] git describe --match v*.. --first-parent --long --tags
[ +16 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[ ] v1.12.13+hotfix.8-0-g0b8abb472
[ +8 ms] executing: [/Users/muhammadmudassar/Documents/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/Users/muhammadmudassar/Documents/flutter/] git ls-remote --get-url origin
[ +12 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +58 ms] executing: [/Users/muhammadmudassar/Documents/flutter/] git rev-parse --abbrev-ref HEAD
[ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +8 ms] executing: sw_vers -productName
[ +15 ms] Exit code 0 from: sw_vers -productName
[ ] Mac OS X
[ ] executing: sw_vers -productVersion
[ +19 ms] Exit code 0 from: sw_vers -productVersion
[ ] 10.15.3
[ ] executing: sw_vers -buildVersion
[ +18 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 19D76
[ +45 ms] executing: /usr/bin/xcode-select --print-path
[ +16 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[ ] /Applications/Xcode.app/Contents/Developer
[ +2 ms] executing: /usr/bin/xcodebuild -version
[ +661 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[ +3 ms] Xcode 11.3.1
Build version 11C504
[ +77 ms] executing: /Users/muhammadmudassar/Library/Android/sdk/platform-tools/adb devices -l
[ +8 ms] Exit code 0 from: /Users/muhammadmudassar/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +29 ms] executing: /Users/muhammadmudassar/Documents/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[ +75 ms] /usr/bin/xcrun simctl list --json devices
[ +133 ms] No supported devices connected.
[ +12 ms] "flutter run" took 1,142ms.

#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:289:7)

#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:590:11)
#3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:515:33)

#4 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#5 _rootRun (dart:async/zone.dart:1126:13)
#6 _CustomZone.run (dart:async/zone.dart:1023:19)
#7 _runZoned (dart:async/zone.dart:1518:10)
#8 runZoned (dart:async/zone.dart:1465:12)
#9 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#11 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#12 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)

#13 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#14 _rootRun (dart:async/zone.dart:1126:13)
#15 _CustomZone.run (dart:async/zone.dart:1023:19)
#16 _runZoned (dart:async/zone.dart:1518:10)
#17 runZoned (dart:async/zone.dart:1465:12)
#18 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#19 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#20 CommandRunner.run. (package:args/command_runner.dart:112:25)
#21 new Future.sync (dart:async/future.dart:224:31)
#22 CommandRunner.run (package:args/command_runner.dart:112:14)
#23 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#24 run.. (package:flutter_tools/runner.dart:63:22)
#25 _rootRun (dart:async/zone.dart:1126:13)
#26 _CustomZone.run (dart:async/zone.dart:1023:19)
#27 _runZoned (dart:async/zone.dart:1518:10)
#28 runZoned (dart:async/zone.dart:1502:12)
#29 run. (package:flutter_tools/runner.dart:61:18)

#30 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#31 _rootRun (dart:async/zone.dart:1126:13)
#32 _CustomZone.run (dart:async/zone.dart:1023:19)
#33 _runZoned (dart:async/zone.dart:1518:10)
#34 runZoned (dart:async/zone.dart:1465:12)
#35 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#36 runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#37 run (package:flutter_tools/runner.dart:50:10)
#38 main (package:flutter_tools/executable.dart:65:9)
#39 main (file:///Users/muhammadmudassar/Documents/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:32)
#41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

@mudi256
Copy link
Author

mudi256 commented Mar 23, 2020

Future myBackgroundMessageHandler(Map<String, dynamic> message) async {
print("terminated!!:$message");
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
new FlutterLocalNotificationsPlugin();
var android = new AndroidInitializationSettings('mipmap/noti');
var ios = new IOSInitializationSettings();
var platform = new InitializationSettings(android, ios);
flutterLocalNotificationsPlugin.initialize(platform);

var android2 =
AndroidNotificationDetails("senderName", "North Messaging", "");
var iOS2 = new IOSNotificationDetails();
var platform2 = new NotificationDetails(android2, iOS2);
ContactsService.getContactsForPhone("senderName").then((value) async {
if (value.isEmpty) {
await flutterLocalNotificationsPlugin.show(
1, "senderName", "text", platform2);
} else {
await flutterLocalNotificationsPlugin.show(
1, value.elementAt(0).displayName, "text", platform2);
}
});

//main.dart
main() async {
runApp(App());
}
//below is add.dart init state
@OverRide
void initState() {
super.initState();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
_firebaseMessaging.requestNotificationPermissions(
IosNotificationSettings(sound: true, badge: true, alert: true)
);
_firebaseMessaging.onIosSettingsRegistered.listen(
(IosNotificationSettings settings) {}
);

_firebaseMessaging.configure(
  onMessage: (Map<String, dynamic> message) async {
    print("onMessage: $message");
    
  },
  onBackgroundMessage: myBackgroundMessageHandler,
  onLaunch: (Map<String, dynamic> message) async {
    print("onLaunch: $message");
  },
  onResume: (Map<String, dynamic> message) async {
    print("onResume22: $message");
  },
);

});

@mudi256
Copy link
Author

mudi256 commented Mar 23, 2020

environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter

cupertino_icons: ^0.1.2
shared_preferences: ^0.5.3
outline_material_icons: ^0.1.0
provider:
flutter_launcher_icons: ^0.7.3
firebase_messaging: ^6.0.9
http: ^0.12.0+2
url_launcher: ^5.1.1
toast: ^0.1.5
flutter_screenutil: ^0.6.0
fluttertoast: ^3.1.0
intl: ^0.15.7
cached_network_image: ^2.0.0
image_picker: 0.6.0+17
firebase_auth: 0.15.3
contact_picker: ^0.0.2
firebase_core: 0.4.4
firebase_storage: 3.0.5
contacts_service: ^0.3.10
libphonenumber: ^1.0.0
firebase_database: ^3.1.3
flutter_local_notifications: ^1.2.0+4
connectivity_widget: ^0.1.1
flutter_linkify: ^2.1.0
flutter_selectable_text: ^0.3.1
permission_handler: ^4.4.0
flutter_image_compress: ^0.6.3
path_provider: ^1.3.1
scroll_to_index: ^1.0.2
indexed_list_view: ^1.0.8
isolate: ^2.0.2
dev_dependencies:
flutter_test:
sdk: flutter

flutter_icons:
image_path: "assets/icon/northIcon.png"
android: true
ios: true

flutter:
uses-material-design: true
assets:
- assets/icon/github_ic.png
- assets/linkedin_ic.png
- images/img_not_available.jpeg

fonts:
- family: Rubik
fonts:
- asset: assets/fonts/Rubik/Rubik-Light.ttf
weight: 300
- asset: assets/fonts/Rubik/Rubik-Regular.ttf
weight: 400
- asset: assets/fonts/Rubik/Rubik-Medium.ttf
weight: 500

@iapicca iapicca removed the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Mar 24, 2020
@mudi256
Copy link
Author

mudi256 commented Mar 24, 2020

@iapicca I provide all detail which you want, why the tag is "waiting for customer response"?

@iapicca
Copy link

iapicca commented Mar 25, 2020

@iapicca I provide all detail which you want, why the tag is "waiting for customer response"?

Hi @mudi256
I removed the tag, I didn't add it

@mudi256
Copy link
Author

mudi256 commented Mar 25, 2020

update dart plugin to 192.7761,
firebase service plugin to 3.6.0
and flutter plugin to 44.0.2 resolve the issue

@mudi256 mudi256 closed this as completed Mar 25, 2020
@firebase firebase locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants