Angular 6 - Chrome in IOS - Router problem - ios

I'm working on an Angular 6 web site and I face a weird problem only on Chrome in IOS (iPad, iPhone).
Each page renders correctly when going directly to each link. But when I click on any of the links inside any page, it generates a NavigationError like these one:
TypeError: Argument 1 ('other') to Node.contains must be an instance of Node
TypeError: Argument 1 ('node') to Node.insertBefore must be an instance of Node
It's really difficult to debug Chrome inside IOS so it's hard to get more information.
My web site is working well on any other browsers and OS, Firefox(windows, linux), Chrome (windows and linux), Safari (ios, osx, windows).
Anyone got an idea where to start looking?
Thank you!

Apparently, the problem is happening only on Google Chrome iOS when this code is present:
let script = window['document'].createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', 'https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1');
window['document'].body.appendChild(script);
window['__onGCastApiAvailable'] = function (isAvailable) { /*Do chromecast initialization*/}
So I added this condition:
if(!navigator.userAgent.match('CriOS'))
Problem resolved.
I really don't know why cast framework is breaking angular routing.

Related

Nativescript angular RadSideDrawer is undefined

I am working on Nativescript Angular and i have a RadSideDrawer for iOS device only. When i install the app, login and click on the button for RadSideDrawer i receive an error that TypeError: sideDrawer.showDrawer is not a function. (In 'sideDrawer.showDrawer()', 'sideDrawer.showDrawer' is undefined) . However when i hit CTRL + S and the app restarts, the RadSideDrawer works fine. Any help is appreciated.
My code structure is similar to this sample project https://play.nativescript.org/?template=play-ng&id=ZyeGeF&v=3
For debugging purposes, force an Angular change detection cycle beforehand. Maybe you are executing the side drawer function before the component is available.
But, could you give us the exact code—or excerpts—in your question so we can better aid you?

sdk-3.1.1.js:1 Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided

Agora SDK gives me this error and doesn't connect the stream only on the laptop mobile (the mobile screens we create under the responsivity section of Developer tools [Inspect Element]).
It works fine on normal mobiles and laptops but I also get an error for this. Any thing that I'm missing out or doing wrong?
File a bug with agora. This is most likely using URL.createObjectURL(mediaStream) instead of setting videoElement.srcObject somewhere. And that method (or particular usage of the method) in Chrome 71 according to https://bugs.chromium.org/p/chromium/issues/detail?id=800767

ADAL for Cordova - Assistance Getting Started

Hello: I'm trying to get started with the ADAL plug-in for Cordova. Having used the native libraries a few times, I thought this would be pretty straightforward but I ran into a bit of an issue.
First of all my environment is VS2017, and the plugin is ADAL for Cordova 0.10.1.
I've created what I believe is the most simplistic example of a connection, using my own client application specifics and the ones provided in their sample online (which is) included below. My authentication looks like:
function authenticate(authCompletedCallback, errorCallback) {
var authority = "https://login.microsoftonline.com/common",
redirectUri = "http://localhost:4400",
resourceUri = "https://graph.windows.net",
clientId = "a5d92493-ae5a-4a9f-bcbf-9f1d354067d3";
var authContext = new Microsoft.ADAL.AuthenticationContext(authority);
authContext.acquireTokenAsync(resourceUri, clientId, redirectUri).then(authCompletedCallback, errorCallback);
This is then called in onDeviceReady();
acquireTokenAsync is called but doesn't appear to return either success or failure and a quick Fiddler trace doesn't appear to show the call which makes me wonder if it is not a configuration issue with Cordova to begin with.
I have commented out the Content-Security-Policy metatag with similar results.
Thank you in advance for any guidance!
Edit
Okay, perhaps this is helpful. I noticed that on the Cordova Plugin Simulation tab (I am trying to run this in the simulator in Chrome). I am seeing a dialog box with error:
There is no handler for the following exec call:
ADALProxy.acquireTokenAsync(...
Also, seems to work on a connected Android Device, just not in the local Simulator
The plug-in for Cordova doesn't support to run on the browser platform. When we developer an Cordova app and want to test on the browser platform, we have to ensure that the app depends on support the browser platform.
For the ADAL plug-in for Cordova support the platform:
Android (OS 4.0.3 and higher)
iOS Windows (Windows 8.0, Windows 8.1,
Windows 10 and Windows Phone 8.1)
And for other kinds of plug-in you can check it via you the Cordova plug-in.

appcelerator iOS application error with geolocation module

We are developing app for iOS and Android and we are using Ti.Gelocation to getCurrentPosition and then set the Region of the MapView of ti.map module.
The app is already on marketplace and downloaded, so we are developing an important upgrade with this new feature. We dont't have problem with Android platform, but with iOS version of the app we get a several error invoking Ti.Geolocation module
The error on iOS 9.x on iPad and iPhone (we have no test on iPod) is:
-[__NSCFString containsObject:] unrecognized selector sent to instance 0x1463d500 at GeoView.js (line xxxx)
This error happens with the project with it.vocami.vocamiapp app-id, in the test project (ap-id=it.vocami.vocamitest) that we use for research and test of new features, no error happens and all run good. When we add at every level of our code (in the first row too), for example, Ti.Geolocation.locationServiceEnabled, in the main vocamiapp project, we get the error.
We have tried all we could think but at the end, if we change the app-id, the code runs otherwise we get the error. We cannot change the app-id because we need to update our published app.
We are developing with AppceleratorStudio version 4.5.0.021602170281 and Ti SDK ver 5.2.0GA on Mac OS X 10.10.5.
I just recently was "hit" by the fact that when I made my app ready for Google Play I use a specific key/user to sign it with. That behaves differently from just running it locally on the phone.
I had to make sure that I had registered two certificates with Google's API in the developer console. It didn't give me exactly the message that you show - but wouldn't show the map with a location. And the way I read the location prior to showing it on the map led me in the wrong direction looking at permissions on Android first :-)
/John

PhoneGap + Sencha2 screen blank

I've started a project in PhoneGap which will utilise Sencha Touch 2.
I tried to change the app name from 'app', since I've heard that conflicts with PhoneGap on Android devices. I altered app.js to main.js and that worked, but then I tried changing the Ext.application.name. All I got was a white screen after the loading splash, even with the old name Sencha. Debug console shows nothing at all happening, and the document <body> was empty. This happens with both sencha-touch-all.js and sencha-touch-all-debug.js. Test device is an iPad 1G running iOS 4.3.5.
Aside: To debug this issue, I set up weinre on my Mac and added the appropriate <script> tag to index.html. After making that change, though, the app didn't even launch. It hung on the PhoneGap splash png and I got this message from gdb-remote:
error: failed to launch '<app URI>' -- failed to send the qLaunchSuccess packet
The only reference to that message besides its definition in gdb-remote source that I can find is here, and it's unrelated. I managed to get the issue to go away by restarting the iPad and removing build intermediates.
SOLVED: The issue here was a missing value in the Ext.application definition (key with no associated value), so the whole app definition probably tanked as a result of that. Hence blank screen.

Resources