Nativescript App will run but not debug? - nativescript

I have a Nativescript app which I have been developing fine on windows with an Android simulator. I have just moved over to my mac, to try out my app on ios.
The app will deploy to a device with the tns run ios command, but if I run tns debug ios, I get an error:
[31;1mTimeout waiting for response from NativeScript runtime.
Command failed: The debug process exited unexpectedly code:127
tns doctor doesn't show any issues.
Any ideas what could be wrong?

I found that such an issue has been reported in this github issue 1620.
Another option if your are using http / https requests in your app tns debug ios could lead to error.

This is pretty old but I just saw in my related--did you try increasing the timeout?
The help docs say it defaults to 90 seconds, but doesn't seem to really work that way. Whenever I debug I almost always set the timeout to 5 minutes by adding: --timeout=300

Related

Electron Debugging

I have an Electron app in the Mac AppStore that is essentially just a wrapper around a hosted web app. A few months ago one specific thing has stopped working in this app. I'm using redux-offline to sync changes to the server and this is just not happening any more.
It's working when running it outside of Electron - in any modern browser.
All other requests are working fine.
It's working when debugging it locally.
It's working when running the built version locally.
BUT it fails in the published Mac App Store version. I'm not catching any errors in my logs (server-side or client-side). I just upgraded to the latest Electron (electron#4.1.4, electron-packager#13.1.1) hoping it would solve it - to no avail. I don't even know how to properly debug it since it's only failing in the published version.
Any ideas? On causes, solutions or ways to debug it?
Seems like your application closes by itself. Check all of app.quit executions. For me issue was that app.requestSingleInstanceLock() returns the wrong value for Mac Store build. Please check this issue, if the problem is related to app.requestSingleInstanceLock().

Xcode: [ERROR] Failed binding IPv4 listening socket: Address already in use (48)

I have an ionic v1 project that I made updates to run properly on iPhone X but am getting errors in the simulator. I filed this ticket on ionic-v1 forum but it has been 10+ days and haven't received any response so I am posting it here in hopes of getting some guidance.
Essentially when I run the older version of my project on iPhone simulator through XCode it comes up fine. However when I run the updated project on the same simulator I get a "Not found" error as below.
In the XCode log I see this error
[ERROR] Failed binding IPv4 listening socket: Address already in use (48)
This error is not present when I run the older version of the code that run successfully. I am not quite sure what socket is in use here and how to free that up. The updated code runs fine on a real device.
I am on Xcode 9.2 and iOS 10.13.2
Appreciate any help/pointers.
Thanks,
Sanjay.
I faced with the same issue with and found that an app spin off a built-in web server which serves www files. Thus when an app is run in emulator the server may conflict with another app on a host machine which also binds to 8080 port. In my case there was a dev web server which was run before.
You should check if some app binds to 8080 port on your machine. I suppose that two iOS emulator might conflict with each other as well.
My environment:
ionic-angular: 3.9.2
cordova: 8.0.0
cordova-ios: 4.5.4
cordova-plugin-ionic-webview: 1.1.16

Ajax call fails on iOS 10 but works fine on previous versions for Cordova application

I am using the latest iOS platform and plugins in my cordova application. The app works fine on older versions of iOS but not on iOS 10. I am getting timeout error. Tried removing platform and adding again. Also created a fresh project. Still no luck. The app works fine on Android as well.
I ran into the same Problem and apparently there is no fix at this time. Here is the current thread with this bug in the apple forum: https://forums.developer.apple.com/thread/64526
This is a similar issue to this one : Cordova whitelist iOS 10 SSL error: Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made
I found that it solved my problem with API calls and WebViews that broke when iOS 10 came out.

Automating iOS 8 app with Appium causes app freeze

We have an app that we run automation tests on with Appium. We can launch the app on the device and simulator through Appium. However, the app hangs and freezes after Appium sends 2-3 tap commands. After the freeze, Appium can not find any other elements on the screen.
We looked into writing a test script using Xcode 6.0.1 Instruments, but when the script is run, the app hangs as well.
The app performs as expected when testing manually. It only hangs when we try to run automation on it either with Appium or with Xcode's Instruments. We are using Appium v1.3.0-beta1, and Xcode 6.0.1.
This seems to be a similar issue to this question, but our test device is already on 8.0.2.
So it turns out that with iOS 8, logging too much data (particularly the case when you're logging API responses) can cause a race condition during Automation. We were able to solve our automation freezing issues by disabling logging from the app.
The solution was discovered thanks to the wonderful analysis by #tbao on this post: https://discuss.appium.io/t/app-freezes-when-automated/1030/8
There is way to restart Appium Server during runtime , which helped us to overcome freezing issue:
Please have a look at my blog for more details:
http://www.qaautomationsimplified.com/android/restarting-appium-server-improve-various-server-freezing-issues-may-improve-execution-time/
Got the same problem when automating web application (Safari) on iOS, solved it by switching from appium 1.15.1 to 1.16.0-beta.3 that is available on mac by executing the install command:
npm install -g appium#beta --unsafe-perm=true --allow-root

Xcode Fails to Launch iPhone Simulator

I am attempting to launch the iPhone simulator from Xcode, but I keep getting the following error:
Error from Debugger: Failed to launch simulator: Operation failed with underlying error: 4294967253.
I've found a number of posts where Xcode failed to launch the simulator, but none of them match the specific error code I'm receiving.
Glad you got things solved senfo. I've found that doing a full rebuild can work as well as checking your system console log for erroneous error message/warnings. Xcode unfortunately seems to be rather poor at conveying errors when deployments fail to the simulator.
Whenever I've had issues like this, Force Quitting the simulator from the dock (Alt-Right click), followed by Xcode seemed to do the trick. After doing that I could reload my project and it would run fine.
Failing that, I hear it might help to reboot your mac (though I've never needed to go that far).
I'm not sure why I didn't try this earlier, but installing the latest version of Xcode fixed the problem.

Resources