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

Dart Error: Dart_LookupLibrary: library 'package:telephony/telephony.dart' not found. #165

Open
mazharulsabbir opened this issue Oct 8, 2022 · 16 comments

Comments

@mazharulsabbir
Copy link

Hello, I am getting the below error when,

  1. I run app in release mode using flutter run --release
  2. App is running in background,

Note: App is working fine on foreground. I have disabled battery optimization from my device

E/flutter ( 9686): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:telephony/telephony.dart' not found.
E/flutter ( 9686): [ERROR:flutter/runtime/dart_isolate.cc(668)] Could not resolve main entrypoint function.
E/flutter ( 9686): [ERROR:flutter/runtime/dart_isolate.cc(167)] Could not run the run main Dart entrypoint.
E/flutter ( 9686): [ERROR:flutter/runtime/runtime_controller.cc(385)] Could not create root isolate.
E/flutter ( 9686): [ERROR:flutter/shell/common/shell.cc(604)] Could not launch engine with configuration.

@au-top
Copy link

au-top commented Oct 13, 2022

use flutter version 3.0.4

@EngOmarDr
Copy link

EngOmarDr commented Oct 17, 2022

@mazharulsabbir I have the same problem what is the best solution ?

@mazharulsabbir
Copy link
Author

I didn't get any.

@ozbply
Copy link

ozbply commented Nov 2, 2022

I have the same problem

@NamBuiDanh2001
Copy link

NamBuiDanh2001 commented Nov 11, 2022

add @pragma('vm:entry-point') to background entry-point function

@ozbply
Copy link

ozbply commented Nov 12, 2022

Ekle@pragma('vm:giriş noktası') arka plan giriş noktası işlevine

not working problem is telephony

@mahesh-gubbi
Copy link

Am also facing the same issue, please give some updates. Thank you.

@ParhaMDeF
Copy link

I have this issue too. any update?

@definev
Copy link

definev commented Dec 3, 2022

This will fix this issue #168. For the time waiting until it's merged you can use my clone directly.

telephony:
  git:
    url: https://github.com/definev/Telephony.git
    ref: develop

@ParhaMDeF
Copy link

This will fix this issue #168. For the time waiting until it's merged you can use my clone directly.

telephony:
  git:
    url: https://github.com/definev/Telephony.git
    ref: develop

You are a lifesaver bro👏

@amresh4448
Copy link

amresh4448 commented Jan 23, 2023

flutter run --release

E/flutter (22741): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:telephony/telephony.dart' not found.
E/flutter (22741): [ERROR:flutter/runtime/dart_isolate.cc(668)] Could not resolve main entrypoint function.
E/flutter (22741): [ERROR:flutter/runtime/dart_isolate.cc(167)] Could not run the run main Dart entrypoint.
E/flutter (22741): [ERROR:flutter/runtime/runtime_controller.cc(385)] Could not create root isolate.
E/flutter (22741): [ERROR:flutter/shell/common/shell.cc(604)] Could not launch engine with configuration.

how can i solve this issue
Amresh

@amresh4448
Copy link

working on debug mode but not working on Relase mode in flutter

@khanakia
Copy link

khanakia commented Feb 2, 2023

I am having the same issue works on debug mode but not on the release mode

@khanakia
Copy link

khanakia commented Feb 2, 2023

@definev @ParhaMDeF
I am getting this error now after adding @pragma('vm:entry-point') this

    NoSuchMethodError: No top-level getter 'onBackgroundMessage' declared.
    Receiver: top-level
    Tried calling: onBackgroundMessage

Note i have already a top level custom onBackgroundMessage as i am using the telephone example from the repo

@amresh4448
Copy link

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(failed_to_fetch_sms, Flutter Telephony: Error getting SmsManager, null, null)
E/flutter ( 5660): #0 StandardMethodCodec.decodeEnvelope
message_codecs.dart:653
E/flutter ( 5660): #1 MethodChannel._invokeMethod
platform_channel.dart:296
E/flutter ( 5660):
E/flutter ( 5660): #2 Telephony.sendSms
telephony.dart:321
E/flutter ( 5660):
E/flutter ( 5660): #3 _home_pageState.build.
home_page.dart:258
E/flutter ( 5660):
E/flutter ( 5660):

how to solve this issue

@amresh4448
Copy link

amresh4448 commented Feb 6, 2023 via email

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

10 participants