BackgroundGeolocation does not exist in ionic 4 - ionic-framework

I am using Ionic4
Steps to reproduce
ionic cordova plugin add cordova-plugin-mauron85-background-geolocation#alpha
npm install #ionic-native/background-geolocation
ionic cordova run android
Please see the following adb log
03-08 13:54:54.102 18251 18251 D SystemWebChromeClient: http://localhost/polyfills.js: Line 2557 : Uncaught Error: Module cordova-plugin-mauron85-background-geolocation.BackgroundGeolocation does not exist.
03-08 13:54:54.102 18251 18251 I chromium: [INFO:CONSOLE(2557)] "Uncaught Error: Module cordova-plugin-mauron85-background-geolocation.BackgroundGeolocation does not exist.", source: http://localhost/polyfills.js (2557)
03-08 13:54:56.622 18251 18251 D SystemWebChromeClient: http://localhost/vendor.js: Line 50653 : Angular is running in the development mode. Call enableProdMode() to enable the production mode.
03-08 13:54:56.622 18251 18251 I chromium: [INFO:CONSOLE(50653)] "Angular is running in the development mode. Call enableProdMode() to enable the production mode.", source: http://localhost/vendor.js (50653)
03-08 13:54:58.942 18251 18251 D SystemWebChromeClient: http://localhost/cordova.js: Line 1219 : deviceready has not fired after 5 seconds.
03-08 13:54:58.942 18251 18251 I chromium: [INFO:CONSOLE(1219)] "deviceready has not fired after 5 seconds.", source: http://localhost/cordova.js (1219)

Related

After upgrade from Flutter 2 to Flutter 3 on running automation, my app immediately crash after launch

We try to run Automation with Webdriver.io, Appium and appium flutter driver.
After upgrade from Flutter 2 to Flutter 3 app is crash immediately after launch. It's happen on both Android and iOS (physical and simulator devices).
App release with Flutter 2 is work correctly.
Build command:
flutter build apk --debug --target=./test_driver/build.dart
Run command:
npx wdio config/wdio.android.flutter.conf.js --spec tests/flutter_specs/app.test.spec.js
In Output get an error:
DEBUG webdriver: request failed due to response error: unknown error
ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: Cannot read property 'match' of undefined
ERROR webdriver: unknown error: An unknown server-side error occurred while processing the command. Original error: Cannot read property 'match' of undefined
I cleaned npm node modules and package.lock and it didn't help.
My dependencies from package.json:
"dependencies":
"#wdio/appium-service": "^6.1.16",
"#wdio/cli": "^6.1.24",
"#wdio/jasmine-framework": "^6.1.23",
"#wdio/junit-reporter": "^7.5.3",
"#wdio/local-runner": "^6.1.24",
"#wdio/sauce-service": "^6.1.16",
"#wdio/spec-reporter": "^6.1.23",
"#wdio/sync": "^6.1.14",
"appium": "^1.21.0",
"appium-flutter-driver": "0.0.4",
"appium-flutter-finder": "^0.1.0",
"babel-eslint": "^10.1.0",
"node-fetch": "^2.6.0",
"webdriverio": "^6.1.24"
},
"devDependencies": {
"npm-bundle": "^3.0.3"
},
"bundledDependencies": [
"#wdio/appium-service",
"#wdio/cli",
"#wdio/jasmine-framework",
"#wdio/junit-reporter",
"#wdio/local-runner",
"#wdio/sauce-service",
"#wdio/spec-reporter",
"#wdio/sync",
"babel-eslint",
"node-fetch",
"webdriverio"
]
### Update!!
We clone small flutter project with minimum dependencies: https://github.com/bitrise-dev/flutter-sample-app-hello-world
Before update to flutter 3 all works fine, but after it we get the same error mention before
Any help to solve the issue...

unexpected system image feature string, emulator might not function correctly, please try updating the emulator

I Created an Emulator on Windows 10 without Installing Android Studio. But when I try to launch it, I get this error. Please help me. How can I fix this..?
C:\Users\This pc\AppData\Local\android\emulator>emulator -avd nexus
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
WARNING | Crash service did not start
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
WARNING | cannot add library vulkan-1.dll: failed
WARNING | cannot add library vulkan-1.dll: failed
INFO | added library C:\Users\This pc\AppData\Local\android\emulator\lib64\vulkan\vulkan-1.dll
INFO | configAndStartRenderer: setting vsync to 60 hz
ERROR | Failed to open /qemu.conf, err: 2
Incompatible HAX module version 3,requires minimum version 4
No accelerator found.
C:\Users\This pc\AppData\Local\android\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: failed to initialize HAX: Invalid argument
Try this page: https://developer.android.com/studio/run/emulator-acceleration.
Judging from the line in your error "Incompatible HAX module..." you need an update.
In "Windows Features" I have Hyper-V unchecked, Virtual Machine Platform and Windows Hypervisor Platform checked.
Here's similar output from my machine where I have a working emulator set to x86 and api 30. My problem is getting my app running on api 31+ and 86_64.
INFO | configAndStartRenderer: setting vsync to 60 hz
INFO | added library vulkan-1.dll
ERROR | Failed to open /qemu.conf, err: 2
WHPX on Windows 10.0.22000 detected.
Windows Hypervisor Platform accelerator is operational

Getting INSTALL_FAILED_UPDATE_INCOMPATIBLE error

Appium Server version: 1.7.1
OS: Windows 8
While running the code I got
org.openqa.selenium.WebDriverException:
An unknown server-side error occurred while processing the command.
Original error:
Error executing adbExec.
Original error:
'Command 'D\:\\Android\\android-sdk\\platform-tools\\adb.exe -P 8080 -s ------ install C\:\\Users\\resi\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock \\bin\\unlock_apk-debug.apk' exited with code 1';
Stderr: 'Failed to install C:\Users\resi\AppData\Local\Programs\appium-desktop \resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE:
Package io.appium.unlock signatures do not match the previously installed version; ignoring!]'; Code: '1'
error and Appium Setting page is opened and instant closed in real Android device instead of opening app (.apk file)
You need to cleanup the device you are using:
Go to Settings -> Apps
Delete you application under test using Uninstall for all users menu
Delete Appium Settings app
Restart your test and it should work

Ionic run on device not working - daemon issue

It was working find, however now I'm getting the below error, when I run this command:
ionic run android
ERROR running one or more of the platforms: Error: adb: Command failed with exit code 1 Error output:
adb I 3000 58815 usb_osx.cpp:259] Found vid=04e8 pid=6860 serial=41007659c88da12f
adb I 3000 58815 usb_osx.cpp:259]
error: could not install smartsocket listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
You may not have the required environment or OS to run this project

How to use ngcordova facebook and push notification plugins in single ionic app

when i am using ngCordova facebook and pushNotification plugins in same app and build the app then find the following error.
========================================================================
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/opt/android-sdk-linux/build-tools/23.0.1/dx --dex --no-optimize --output /home/anurag/my-works/fbPush/platforms/android/build/intermediates/dex/debug --input-list=/home/anurag/my-works/fbPush/platforms/android/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 38.579 secs
/home/anurag/my-works/fbPush/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/anurag/my-works/fbPush/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/anurag/my-works/fbPush/platforms/android/build.gradle,-Dorg.gradle.daemon=true
I had the same issue on my app and i solved it by removing my cordova facebook plugin and adding this one : https://github.com/jeduan/cordova-plugin-facebook4
My push notification plugin is : phonegap-plugin-push