Starting PalmPre2 Dev. Palm-install says: "no devices found" - webos

I am a iPhone Developer trying to start PalmPre2 development, so I am doing as written here
I have my emulator working and running.
I have created my workspace directory
$mkdir palmWorkspace
$cd palmWorkspace
I have create my app
$ palm-generate -p "{title:'Hello World', id:com.nacho4d.hello, version:'1.0.0'}" HelloWorld
generating new_app in /Users/nacho4d/Documents/palmWorkspace/HelloWorld
I have packaged it
$ palm-package Helloworld
creating package com.nacho4d.hello_1.0.0_all.ipk in /Users/nacho4d/Documents/palmWorkspace
but now when I try to install it I get:
$ palm-install com.nacho4d.hello_1.0.0_all.ipk
palm-install: no devices found
palm-install: no device found
Even though I have the emulator running it says the same, why is that?
Thanks in advance.
Ignacio

Answer to myself:
I have realized that pal-install seems not to be as fast as expected when recognizing/finding a running emulator. I mean, if you start the emulator just before running palm-install command, this will probably fail. After a while running the same command worked as expected ;)

Related

CFBundleIdentifier does not exist on react-native

Easy bounty here for grabs. Does not necessarily require any react-native experience. Problem seems to be in open source code, which is available out there:
Updated xcode, and now when I try to run my react-native app by issuing following command: react-native run-ios I get an error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
debug Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnSimulator (project-root-dir/node_modules/#react-native-community/cli/build/commands/runIOS/runIOS.js:181:45)
Before those errors, the command prints out info about successful build, and that it is about to install the build:
info ** BUILD SUCCEEDED **
info Installing DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app
So it seems the build is ok, but when it tries to install the app it fails?
Think I've tried "everything" I found from other questions with this similar error message, but nothing has worked for me.
Some specs:
react-native: 0.59.10
react: 16.8.3
xcode-version: Version 12.2 (12B45b)
I know there are similar questions on stackoverflow. But since none of the solutions provided there worked for me, and I wish to get it fixed, I made this separate question.
I do not know where the Info.plist file is that it tries to find: DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Inside my ios folder, there is a folder called DerivedData, but inside that there are no folder with a name Build. So I think it might be looking from a wrong location?
UPDATE:
I've been able to pinpoint where the cli launch goes wrong:
https://github.com/react-native-community/cli/blob/ba298d9c47af522f0377325bebc6c2075d41790a/packages/platform-ios/src/commands/runIOS/index.ts#L378
If I change that line let buildPath = build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app
to -> build/${scheme}/Build/Products/${configuration}-${device}/MyAppRealName.app;
Then the dev launch works nicely, there's no problem. So it seems that getting the appName goes wrong. The appName is resolved here: https://github.com/react-native-community/cli/blob/ba298d9c47af522f0377325bebc6c2075d41790a/packages/platform-ios/src/commands/runIOS/index.ts#L387
const productNameMatch = /export FULL_PRODUCT_NAME="?(.+).app"?$/m.exec(buildOutput);
I could do a post install npm script that just sets the name of the app correct and call it a day. But that's pretty hacky way. I wonder if there's an alternative that works better? I see that the runIOS file has been updated from the version that I have quite much, but the function getProductName still remains the same. So Im not sure if updating just the cli would work, or if it would even be possible, because it might require a newer react-native version, which is not an option for me right now.
newer version of #react-native-community/cli is not working on older version react-native because in newer version they have change getProductName to getPlatformName. for more detail you can read summary of this PR
Solution
As a local workaround, patch the package by patch-package node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js and edited getProductName (lines 362–365) to read:
function getProductName(buildOutput) {
const productNameMatch = /export FULL_PRODUCT_NAME\\?="?(.+).app"?$/m.exec(buildOutput);
return productNameMatch ? productNameMatch[1].replace(/(?:\\(.))/g, '$1') : null;
}
The result from react-native run-ios is:
DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
The correct should be:
DerivedData/Build/Products/Debug-iphonesimulator/MyAppRealName.app/Info.plist
Then you could fix it by edit Xcode project as:
Open Product menu (status bar)
Scheme -> Edit Scheme
Under build section, add a post-action
In provide build settings from: choose target of your app
Use the script to copy wrongname.app to realname.app: cp ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app ${BUILT_PRODUCTS_DIR}/real_name.app
Or you can use symlinks instead of copying.

The 'termux-battery-status' command in (Termux: API) does not work

I want to know the current battery value on my phone, but I can not do this. When I enter the 'termux-battery-status' command, my terminal hangs (it doesn’t output anything).
I read on various forums about changing application settings Like this or like this.
My telephone:
$ termux-info
Packages CPU architecture: aarch64
Updatable packages: All packages up to date
Android version: 9
Kernel build information: Linux localhost 4.9.117+ #4 SMP PREEMPT Mon Jul 8 17:13:44 CST 2019 aarch64 Android
Device manufacturer: Blackview
Device model: A60Pro
Termux Settings:
I do not understand how to fix this. :/
Help me please.
Please install the Termux:API app on your device : https://play.google.com/store/apps/details?id=com.termux.api
After installation, head over to App Info for the Termux:API app, and allow all the permissions including Modifying System Setting.
Try termux-api-start command first. This is what helped me
RUN Termux-API in your phone in 2023
This will solve all the termux-api problems including Termux-battery-status issue.
Since Developers have stopped updating the playstore version of termux it is not going to work properly, so from now on we have to use termux from the f-droid website. Also, you need to install the termux-api.apk to make these api commands work. below is the simple code that can make everything work in few seconds
So firstly install termux application from F-Droid, Download link. If you are already using the F-Droid version, then skip this step.
Just copy the entire code directly and paste it inside your termux. it will open the termux-api page for you, just install it and everything will be fixed.
echo -e "\e[031m" "HEY, MAKE SURE TO INSTALL THE TERMUX API APP THEN
COME BACK AGAIN IN TERMUX" && sleep 2 && xdg-open
"https://f-droid.org/repo/com.termux.api_51.apk"&& echo -e '\e[032m'
'HAVE YOU INSATLLED TERMUX API APK? IF YESS THEN PRESS ENTER, IF NO
THEN RE-RUN THE SCRIP AND THIS TIME INSTALL THE APK IN YOU PHONE' &&
read r && pkg install "termux-api" && exit
type termux-battery-status to find the battery info.
To make everything work even smoother, go in your settings>apps> search Termux:API and make sure to allow every permission you can enable.
download termux api app from play store then you can easily use that commands its 200% true just try its only 2MB app

How to deploy an Expo/React Native app to iOS Device from Xcode

I'm somewhat new to react native and expo but I've been trying to deploy a test version to my phone but can't figure out how to get it to build.
For some extra context, I built most of it in Expo and then ejected it (yes I know this isn't the best choice but I liked the features Expo provided). I ejected it because I needed NFC support which isn't currently supported in Expo so I added that in manually in Xcode after I ejected.
When I open the Xcode workspace and try to deploy it to my phone I get the following error:
Error: Failed to connect to the packager server. If you did not start this build by running 'react-native run-android', you can start the packager manually by running 'react-native start' in the project directory. (Error: Request to packager server failed: 500)
    at /Users/user/Downloads/honorProj-reactNatveFinal/honorProj/reactNative/ethelontisApp/node_modules/expo-updates/scripts/createManifest.js:40:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Command PhaseScriptExecution failed with a nonzero exit code
I know it says run react-native start in the project directory (although I'm not entirely what the at /Users/... is refering too) but what really threw me was that it mentioned react-native run-android which doesn't seem like it should be related at all.
Lastly I'm completely and utterly lost with what Command PhaseScriptExecution is.
Thanks for the help.
I was facing the exact same issue. So I just completed the set up the android development first.
But before doing anything, follow the below steps, it may solves the problem.
Step-1: Open terminal and navigate to your project directory example: cd Your project path.
Step-2: Type npx react-native start
Step-3: If you get any error like "error listen EADDRINUSE: address already in use :::8081"
Then follow step-4 to 6:
Step-4 : type sudo lsof -n -i4TCP:8081 // You will get PID from here
Step-5: type kill -9 PIDvalue
Step-6: Repeat the step 2 and 3 once again
If you will not get any error in step- 2 then type npx react-native run-android
and check if there is any error. If yes, then you have to set up the android development first to make it working - (As of now I found this way, but not sure if anyone can find any better way).
Else Open the code using xcode then clean the build and also clean the build folder then try to run.
Thanks, Hope it will help.

Flutter stuck on 'flutter' command - no output to console and it doesn't ever finish

I started following this tutorial about Flutter, and I followed each step until the installation of Flutter on windows, even added flutter to PATH.
Now, once I try to execute flutter in CMD / Powershell (I work on Windows 10), it gives no output.
It seems to recognize the command, but it doesn't give further output for a very long time, the console just remains empty.
Has anyone encountered that problem before and knows how to fix it? Thanks.
The problem was that I installed it in C:/Program Files, the guy in the course didn't mention anything about that but in the link you sent they did.
Here's the key takeaway.
Installing flutter in places that requires elevated privileges (e.g. C:\Program Files\ won't work.
Thank you #pskink for the link.
it takes a long time, just wait. or you input flutter --verbose, it will output infomation to console.
Flutter is still in early development (version 1.20 at this point) and things seem to break (occasionally)
I just uninstalled and reinstalled flutter, which got it working again....
On Ubuntu 20.04 I installed flutter using snap. When there is a new release, it downloads almost 500M of files to refresh, and the whole time there is no output (even when I use --verbose flag). I had to use strace to find that a file is being downloaded.
sudo strace -f -t -e trace=file flutter
The output:
[pid 7377] 11:44:20 openat(AT_FDCWD, "latest_stable.tar.xz", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6
0 515M 0 2206k 0 0 321k 0 0:27:22 0:00:06 0:27:16 375k^Cstrace: Process 7377 detached

Fastlane command not found in XCode bots post build trigger

Here's my script
echo "===================="
echo "MAKE ENTERPRISE IPA"
echo "===================="
pwd
cd "${XCS_PRIMARY_REPO_DIR}/"
pwd
fastlane enterprise
This is what's in the logs
====================
MAKE ENTERPRISE IPA
====================
/Users/XcodeServer/Library/Caches/XCSBuilder/Bots/1fc5d5c4b44f01807859f14cc303b56c/Source
/Users/XcodeServer/Library/Caches/XCSBuilder/Bots/1fc5d5c4b44f01807859f14cc303b56c/Source/ProjectName
/var/folders/rc/28t61gwn3c1bcsn1b360d0h40000gp/T/F389538F-77F0-481A-A413-456C809755D1-22343-000364DDDB596983: line 10: fastlane: command not found
If I march directly to the directory on the build server and go to XCS_PRIMARY_REPO_DIR and type in fastlane enterprise everything works fine. I don't know why it's looking in var/folders for fastlane.
Any help would be greatly appreciated thank you.
I added usr/local/bin to the path. I added the following line before I call fastlane. If anyone knows of a better place to put it. I'm all ears.
export PATH=/usr/local/bin:$PATH
Follow this steps:
Navigate inside the repo. e.g.cd TemplateProject.
Add fastlane command.(Since xcode server can't find the Fastlane command you need to specify path)
To know the path navigate to your project folder from terminal and execute command:
which fastlane
Result will look as:
/Users/yourcomputername/.fastlane/bin/fastlane beta
Now use this to create a post Script command as attached in the image
This now makes xcode server find your fastlane.

Resources