Current behavior
When I try to run the application using tns run ios , it gives me the following error.
attached picture shows the JS Error in the terminal
Expected behavior
The app should boot up without the JS error just like the web application.
Minimal reproduction of the problem with instructions
git clone "name of the repository"
npm i
cd nativescript
npm i
tns run ios
It installs the app successfully , however, the app doesn't open. On manually opening the app, it gives a JS error.
What is the motivation / use case for changing the behavior?
To get the web and mobile running at the same time.
Please tell us about your environment:
Operating system : MAC OS (Tried it on windows too) 16GB RAM
package manager : npm, tns
**Angular Seed Version: 8aae926
Node: node --version = v8.11.3
Related
I am currently pretty lost where to start searching for the error that I am facing. The same AngularJS project that my colleagues have been working on for quite a while on Macs cannot be compiled correctly on my Windows machine. No idea if windows and mac has anything to do with the error but just in case I am adding this information.
I've checked out the project with SourceTree and opend it with WebStorm.
First npm install then gulp dev in the terminal of WebStorm and my angularJs-project is beeing compiled without any errors. When then the browser windows with //localhost is beeing opened, the page shows shortly the loading anymation and then stays blank.
In the attached screenshot you can see the output of the console. Any ideas?
AngularJS Version: 1.7.2
NPM Version: 5.6.0
Gulp:
CLI version 3.9.1
Local version 3.9.1
What could make the difference that the project is running perfectly on other machines but not on mine?
[Edit]:
I have now reanimated my old macbook, checked out the exact same project with source tree, installed webstorm, ran npm install, then doing this to set up gulp and then running gulp dev: The App runs just fine.
On my Windows Laptop I've started all over, deinstalled WebStorm, deinstalled node.js and did the whole set up as described above. Only difference that I need to install node.js manually on Windows to use npm.... same error as described before.
I'm currently trying to learn react native. I created a project using create-react-native-app. After the project is created, I started npm start on the folder which shows the QR code. I've installed the expo app on my android phone and scanned the code but I'm getting a Uncaught Error: Timed out, no manifest in cache on my expo app and there is no stack trace given.
I've made it work a while ago but somehow its currently not working.
Im using windows 10.
npm 5.6
yarn 1.5.1
What I've done to fix it using Ubuntu was (I created my app using create-react-native-app):
open terminal
execute ifconfig
find network interface (wlp4s0, in my case)
execute export REACT_NATIVE_PACKAGER_HOSTNAME="IP_FOUND_BEFORE"
yarn start
SUCCESS! Finished building JavaScript bundle in 10069ms
Expo only supports the most recent 6 versions, this is because we have to have all the native code for each version on the client and that gets big fast 🙃💣. As of writing this v26 is almost out, that version of the expo client will not support v19 projects. Please make sure that your app is up-to-date by going to the app.json (or exp.json depending on how old your project is 😅) and checking the version number.
Outside of that, I would also recommend you start your project by calling exp start in the root folder of your project 💙
The problem that causes this is having multiple network connections. In my case, I have a virtual network connection which is used by the packager instead of the wifi connection. So basically what's happening is that my phone and my computer uses different connections. I've found a solution here: https://github.com/react-community/create-react-native-app/issues/598
iam using genymotion emulator to run react native on mac,
react-native-cli: 2.0.1
react-native: 0.53.0
node:v8.9.4
while i running react-native run-android i got error like this
...
.....
Installing APK 'app-debug.apk' on 'GNexus5623 - 6.0' for app:debug
11:17:39 E/DeviceMonitor: Adb connection Error:EOF
11:17:39 E/DeviceMonitor: Connection attempts: 1
Installed on 1 device.
BUILD SUCCESSFUL
Total time: 14.691 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Starting the app (/Users/yan/Library/Android/sdk/platform-tools/adb shell am start -n com.vero/com.vero.MainActivity...
error: no devices/emulators found
does anyone give me solution, thanks
this worked for me (For debian based systems only), make sure you have configured genymotion to use your android Sdk by:
Open Genymotion
Click on the settings icon
go to ADB tab
Click on use Custom Sdk tools.
navigate to the folder you downloaded
and then add this to your .bashrc
export PATH=/home/{username}/Android/Sdk/tools:/home/{username}/Android/Sdk/platform-tools:$PATH
$ ionic run android --device
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\user\Desktop\transroads\jvdappNew\jvdApp\hooks\after_prepare\010_add_platform_class.js C:/Users/user/Desktop/transroads/jvdappNew/jvdApp
add to body class: platform-android
ERROR running one or more of the platforms: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
You may not have the required environment or OS to run this project.
It was working properly but when i updated my Android Studio there is installed another SDK also now i am having two SDK in the ANDROID_HOME path those are SDK and SDK1. SDK is having API23 and SDK1 API24.
whenever i am running command "ionic run android --device" terminal always shows that error i have discuss above.
Before update of Android Studio everything was working properly but after the update i am unable to run ionic application on my mobile device.ANDROID_HOME path is C:\Users\user\AppData\Local\Android\sdk; and i am having SDK1 folder also after the Android Studios updation on that location.
AVD Manager.exe and SDK Manager.exe those files are only in SDK and SDK1 having nothing like that.Please help me out of this.
Anyone please tell me both the platform can run over a SDK Manager?
You need to update your cordova android platform. Basically the older version till 6.2.0 used android command which is deprecated in the SDK.This was patched in 6.2.0
Check this answer for more info.
Update your cordova cli first:
npm install -g cordova#latest
You can update to the latest platform by doing:
ionic platform add android#6.2.3
Or
ionic platform add android#latest
For IONIC CLI v3 the command is:
ionic cordova platform add android#latest
I installed sencha touch and sencha touch command and was able to view the examples in localhost.
But How do I run these examples in iOS simulator?
I tried below commands from with in the examples directory on iMac
from directory: touch-2.3.1/examples/kitchensink
sencha app package run packager.json
User-iMac:list-horizontal yuyutsu$ sencha app package run packager.json
Sencha Cmd v4.0.4.84
[ERR]
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The application that opened iOS Simulator failed to send all of the required information (sessionUUID, sdkRoot, deviceInfo)." UserInfo=0x7fe4f0d0ce40 {NSLocalizedDescription=The application that opened iOS Simulator failed to send all of the required information (sessionUUID, sdkRoot, deviceInfo)., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
The application was successfully packaged
[ERR] stbuild exited with non-zero code : 1
or from another app, directory: touch-2.3.1/examples/list-horizontal
Also tried running sencha app build -run native.
It failed with
/Users/yuyutsu/work/Software/mobile/Sencha/touch-2.3.1/examples/kitchensink/.sencha/app/packager-impl.xml:83: /Users/yuyutsu/work/Software/mobile/Sencha/touch-2.3.1/examples/kitchensink/resources/loading does not exist
I have Xcode 5. OS X version 10.9.2. I am able to run the native XCode projects in simulator using XCode.
Any idea on how can I run the sencha examples in iOS simulator? Is there a document which has the steps?
One very easy way (if you don't need device api) is to build the webapp through Sencha CMD and navigate in iOS Simulators Safari to the index.html file. You can do "add to Homescreen" and if you click the icon on your homescreen now you get the app in fullscreen.
The big advantage is that you can do really quick builds, but it does not fit always, because it's just the webapp, not the native one.
If you need to package your app native (e.g. for Device API) you can follow this guide: http://frightanic.com/software-development/sencha-touch-native-packaging-for-ios-done-right/
As it is running on localhost, you can simply check on simulators by using the same urls as on browser
iPhone 4
iPhone 5
Also, you can try Intel XDK, it has inbuilt iPhone simultors. It is easy to use. Simply put application and run.
Intel XDK
Or you can try packaging it in native iOS so that you can run in Xcode and see on Xcode simulator your app working. For that you can use Phonegap, refer link
http://docs-origin.sencha.com/touch/2.3.2/#!/guide/cordova-section-iOSNote
Also,
http://docs.sencha.com/touch/2.3.2/#!/guide/native_provisioning
Hope this helps you with your problem.
Failure to launch iOS simulator could be because of the below bug mentioned in sencha forum
"There is currently a bug open SDKTOOLS-783 where Sencha Native packager fails to locate Xcode 5.1 and thus unable to run in simulator."
I will try Phonegap/Cordova and post my observations.