Ionic 5 Google Map Marker breaking animations on IOS - ios

I'm adding google map on an ionic app using google maps javascript api 3. The map works fine but the minute i add marker on the map, the cordova animations stop working on ios, on android everything works smoothly. For example clicking on ion-select or adding Alert produces following error
Unhandled Promise rejection: – "undefined is not a function (near
'...element.animate...')" – "; Zone:" – "" – "; Task:" –
"Promise.then" – "; Value:" (2) TypeError: undefined is not a function
(near '...element.animate...') —
animation-5559213c.js:652 (anonymous function) —
animation-5559213c.js:652 forEach initializeWebAnimation —
animation-5559213c.js:651 initializeAnimation —
animation-5559213c.js:674 play — animation 5559213c.js:950 (anonymous
function) —
animation-5559213c.js:961 forEach play —
animation-5559213c.js:960 (anonymous function) —
animation-5559213c.js:852 ZoneAwarePromise — zone.js:910 playAsync —
animation-5559213c.js:850 (anonymous function) —
overlays-10cf2041.js:202 step — tslib.es6.js:99 fulfilled —
tslib.es6.js:70 run — zone.js:150 (anonymous function) — zone.js:889
runTask — zone.js:195 drainMicroTaskQueue —
zone.js:601 promiseReactionJob
My app's ionic version is 5.2.3. Any help would be appreciated.

Import the web-animations-js polyfill.
Run npm install --save web-animations-js in the terminal then uncomment the following line in src/polyfills.ts:
import 'web-animations-js';

Related

Relogin with OKTA in ionic ios app throws error

I've created an ionic 5 hybrid app and integrated the okta with dev schematics on Cordova platform. I'm able to login first time with accesscode. I'm able to sign-out as well. But on the same page, If I try to login, it throws error after taking the user credentials and navigating time.
**
Checking to see if there is an authorization response to be delivered.
defaultErrorLogger — core.mjs:6484
Error: Uncaught (in promise): Error: advanced-http: "data" option is configured to support only following data types: Array, Object processData#ionic://localhost/plugins/cordova-plugin-advanced-http/www/helpers.js:418:22 sendRequest#ionic://localhost/plugins/cordova-plugin-advanced-http/www/public-interface.js:178:28 post#ionic://localhost/plugins/cordova-plugin-advanced-http/www/public-interface.js:200:39 #ionic://localhost/vendor.js:2824:45 #ionic://localhost/vendor.js:2784:25 ZoneAwarePromise#ionic://localhost/polyfills.js:1353:41 tryNativePromise#ionic://localhost/vendor.js:2783:31 wrapPromise#ionic://localhost/vendor.js:2807:23 #ionic://localhost/vendor.js:23678:77 generatorResume#[native code] #ionic://localhost/vendor.js:30934:75 ZoneAwarePromise#ionic://localhost/polyfills.js:1353:41 __awaiter#ionic://localhost/vendor.js:30930:36 generatorResume#[native code] fulfilled#ionic://localhost/vendor.js:30931:62 onInvoke#ionic://localhost/vendor.js:112176:31 #ionic://localhost/polyfills.js:173:53 #ionic://localhost/polyfills.js:1331:41 onInvokeTask#ionic://localhost/vendor.js:112164:35 #ionic://localhost/polyfills.js:218:61 drainMicroTaskQueue#ionic://localhost/polyfills.js:633:46 promiseReactionJob#[native code]
resolvePromise — zone.js:1255
(anonymous function) — zone.js:1162
rejected — tslib:72:89
onInvoke — core.mjs:25476
(anonymous function) — zone.js:160
(anonymous function) — zone.js:1318
onInvokeTask — core.mjs:25463
(anonymous function) — zone.js:205
drainMicroTaskQueue — zone.js:620
promiseReactionJob
defaultErrorLogger — core.mjs:6484
handleError — core.mjs:6531
next — core.mjs:26030
next
__tryOrUnsub — Subscriber.js:183
next — Subscriber.js:122
_next — Subscriber.js:72
next — Subscriber.js:49
next — Subject.js:39
emit — core.mjs:22409
(anonymous function) — zone.js:160
onHandleError — core.mjs:25502
(anonymous function) — zone.js:174
_loop_2 — zone.js:1113
(anonymous function) — zone.js:1125
drainMicroTaskQueue — zone.js:627
promiseReactionJob
cordova.js:1413
**
Ionic Info:
Ionic CLI : 6.13.1 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 6.0.9
#angular-devkit/build-angular : 13.0.4
#angular-devkit/schematics : 13.0.4
#angular/cli : 13.0.4
#ionic/angular-toolkit : 5.0.3
and
"#oktadev/schematics": "^5.2.2",
Any direction on how to handle this is much appreciated.
Thank you

mediaDevices.enumerateDevices() Generates Runtime Error in Browser

I am attempting to capture audio from an input source via a web app in a browser using the Dart 2.7.0 SDK. I want to be able to identify the available audio sources on the system so that a user could select among them (rather than relying exclusively on the default source):
captureAudio() async{
List<MediaDeviceInfo> sources = await window.navigator.mediaDevices.enumerateDevices();
// Do more stuff here
// Note that there are numerous differences in media APIs between those listed
// for Dart and the JavaScript APIs shown on MDN. Those differences may or may not
// have any effect on this error
}
The line of code above compiles successfully but is generating an error in Chrome 79.0.3945.88 served from Webdev in Webstorm 2019.3.1 whether in debug mode or not (note: MDN shows that the corresponding JS method call should work in Chrome):
Uncaught (in promise) Error: Type 'List<dynamic>' should be 'List<MediaDeviceInfo>' to implement expected type 'FutureOr<List<MediaDeviceInfo>>'.
DartError dart_sdk.js:5172
throw_ dart_sdk.js:3880
castError dart_sdk.js:3840
cast dart_sdk.js:4159
check_FutureOr dart_sdk.js:27380
(anonymous function) dart_sdk.js:52085
Async call from Promise.then
promiseToFuture dart_sdk.js:52087
[dartx.enumerateDevices] dart_sdk.js:79203
captureAudio capturewebaudio.dart:51
runBody dart_sdk.js:32202
_async dart_sdk.js:32230
captureAudio capturewebaudio.dart:50
(anonymous function) capturewebaudio.dart:40
_checkAndCall dart_sdk.js:4084
dcall dart_sdk.js:4089
(anonymous function) dart_sdk.js:97072
Dart documentation on this topic is essentially non-existent, and given the variations in Dart and JS APIs, I'm not sure what the resolution is to this problem.
This appears to be a bug in the Dart SDK. See bug 39627 on the Dart SDK issues list. The fix is moving through the dev process.

APPIUM Android: Implicit wait and explicit wait are not working

Implicit and explicit waits are not working when automating the native app. driver does not wait for the element to visible. Have already set the implicit wait of 25 seconds and also explicit wait(visibilityOf(element)) is defined before performing any action with the element.
The exception is coming as:
Returned value cannot be converted to WebElement: {stacktrace=NoSuchElementError: An element could not be located on the page using the given search parameters.
driver does not wait for the element to be visible when the navigating to the next screen and straight away throws the above exception.
NOTE: Code works fine when Thread.sleep() wait is used. But fails when Thread.sleep() is not used.
Have tried the following ways:
Defined the implicit wait and pageLoadTimeout after Android driver is
initialized with required desired capabilities and URL.
Defined implicit wait and pageLoadTimeout in the #BeforeTest method in the
TestNG test class.
You have NOT to set both waits. If you want to let your driver waits for the element to be visible, use this code during driver initialization:
driver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);

Interactions are not available for this element in Appium

I am getting the following message while identifying element the highlighted element in “Appium”.
Appium: 1.7.1
Device: IPhone X (12.0 & Simulator)
Java client: 1.6.1
Xcode: V 10
Interactions are not available for this element.
Appium- IOS
Aim to read the content of the element using .gettext() method.
Logic used.
// Explicit wait with 30 seconds.
return driver.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(WebElement))).getText();
WebElement used.
1, /XCUIElementTypeApplication[#name=“Event Manager”]/XCUIElementTypeWindow1/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[3]/XCUIElementTypeOther
2, //XCUIElementTypeOther[3]/XCUIElementTypeOther
None of the above return the text that are there in the image. Also no exception/error thrown as well.
Any help on what else can be done to read the web element?
I am facing the same problem where icons having some kind of call to action are not tappable when test case is executed. These are easily identified when I capture it, but if the same is tried within a script, katalon is unable to find it.

Error: global.nativeTraceBeginSection is not a function

I didnt change anything but suddenly I got this error in my xproject and the app got stuck and thing the when I do simulator through my Xcode is working but not with physical device.
the full log is here:
'Failed to print error: ', 'global.nativeTraceBeginSection is not a function. (In \'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)\', \'global.nativeTraceBeginSection\' is undefined)'
WARNING: Logging before InitGoogleLogging() is written to STDERR
E0910 19:37:09.077337 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
E0910 19:37:09.077525 1871998976 JSCHelpers.cpp:143] Got JS Stack: endEvent#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2303:35
__callFunction#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2098:24
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1927:29
__guard#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
callFunctionReturnFlushedQueue#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1926:19
callFunctionReturnFlushedQueue#[native code]
2018-09-10 19:37:09.079 [fatal][tid:com.facebook.react.JavaScript] Error calling Systrace.setEnabled
Unhandled JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
2018-09-10 19:37:09.082 [error][tid:com.facebook.react.JavaScript] global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined)
2018-09-10 19:37:09.083 [info][tid:com.facebook.react.JavaScript] 'Failed to print error: ', 'Can\'t find variable: regeneratorRuntime'
E0910 19:37:09.086755 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined) (<unknown file>:2298)
E0910 19:37:09.086828 1871998976 JSCHelpers.cpp:143] Got JS Stack: beginEvent#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2298:37
__invokeCallback#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2125:28
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1950:32
__guard#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
invokeCallbackAndReturnFlushedQueue#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1949:19
invokeCallbackAndReturnFlushedQueue#[native code]
(lldb)
I have been trying to find solution, didn't succeed with any of them.
this error shows on my Xcode logged and not on my screen of the phone
Thank you so much for the help!!
I had the same issue because I unintentionally enabled Start Systrace and since it is a known react native issue... I was getting the error.
What worked for me was just disabling Start Systrace and restarting the project. How I do that?
Command ⌘ + D
Press Disable Start Systrace, that's it!
This is a known, unresolved React Native issue. There are a few workarounds in the GitHub issue, including:
Delete, and then reinstall the app from Xcode or react-native run-ios
Revert to the old bridge (instructions)
See https://github.com/facebook/react-native/issues/15003 for more details.

Resources