Flutter external URL open fails for AppImage Ubuntu 22.10 - cannot open path of the current working directory - flutter

I've built: flutter build linux --release Flutter app on Ubuntu 22.10.
When app is bundled as AppImage, the call to:
# https://pub.dev/packages/url_launcher
if (await canLaunchUrl(url)) {
launchUrl(url);
}
fails with: cannot open path of the current working directory: Permission denied (printed out in the console from which AppImage runs).
Surprisingly when app is executed outside of AppImage, whether from Android Studio or from release build binary, everything works fine.
I believe this has something to do with the AppImage / sandbox, but not entirely sure where to start.
My AppImage config is rather simple.
AppRun
#!/bin/sh
cd "$(dirname "$0")"
exec ./app_entrypoint
Appname.desktop
[Desktop Entry]
Version=1.1
Type=Application
Terminal=false
Name=App name
Exec=app_entrypoint %u
Icon=icon
Categories=Utility;
UPDATE: I've tested the AppImage on Ubuntu 22.04 and everything seems to be working fine.

Related

cannot open Andoid emulator on VS Code

I am using the github.com/DiemasMichiels/emulator extension for VS Code. Whenever I try to open the emulator, I get these notifications. what is the problem and what should I do about it?
Something went wrong fetching you Android emulators! Make sure your path is correct. Try running this command in your terminal: "false\emulator" -list-avds
source: Android iOS emulator (extension)
Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
source: Android iOS emulator (extension)
Make sure your Windows path is set correctly! Example: C:\Users\Me\AppData\Local\Android\Sdk\emulator
source: Android iOS emulator (extension)
If you are using Windows remove .exe from the path
New path should be: :\Users\HUNG\AppData\Local\Android\Sdk\emulator
See this GitHub issue ticket in the DiemasMichiels/emulator extension's repo: Something went wrong fetching you Android emulators #14
Quoting from some of the comments in the discussion thread there:
https://github.com/DiemasMichiels/emulator/issues/14#issuecomment-464050318 :
This is related to my update with #13. Point it to the directory instead of the actual executable file instead and I think it should work just fine! - antonholmberg
https://github.com/DiemasMichiels/emulator/issues/14#issuecomment-464254880 :
In previous version (0.0.7) it works with:
"emulator.emulatorPath": "%ANDROID_HOME%/emulator/emulator.exe"
But now (1.0.0): Only works when i use absolute path like:
"emulator.emulatorPath": "C:\Users\RodrigoSaka\AppData\Local\Android\Sdk\emulator" - RodrigoSaka
Given those comments, you should update your settings.json with something like this, where you give the absolute path to the directory containing the emulator executable instead of the path to the executable:
"emulator.emulatorPath": "C:\\Users\\{username}\\AppData\\Local\\Android\\Sdk\\emulator"

There was a path error when Ubuntu created AVD via avdmanager

I used the command line tools provided by Android to download the SDK tools.Use the command avdmanager create avd -n nexus5_23 -k "system-images;android-23;google_apis;x86_64" --device "Nexus 5" to create the emulator, I found that the mirror path in the file config.ini was image.sysdir.1=sdk/system-images/android-23/google_apis/x86_64/.
Compared with the emulator path created by Win10, the emulator can be started normally after changing it to image.sysdir.1=system-images/android-23/google_apis/x86_64/.
I can't find a solution to this problem in Google.Can you give me some Suggestions? thank you.
The environment:
Ubuntu 16.04 Server
bash.rc
...
export REPO_OS_OVERRIDE=linux
# ANDROID SDK
export ANDROID_HOME=/home/yaorc/android/sdk
export ANDROID_SDK_ROOT=/home/yaorc/android/sdk
export PATH=$PATH:${ANDROID_HOME}/emulator
export PATH=$PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin
export PATH=$PATH:${ANDROID_HOME}/platform-tools
export PATH=$PATH:${ANDROID_HOME}/build-tools/29.0.3
export PATH=$PATH:${ANDROID_HOME}/platforms/android-29
I found the answer after several attempts.
Because my command-line tools are in the SDK root,This causes the system image path to be confused when the avdmanager creates the AVD.
Solution:
I created the cmdline directory in the SDK root, cut the tools folder into the cmdline, and modified the environment variable file to properly create and start avd.

flutter doctor 'zsh: command not found'

I have installed flutter and set up the path with the zsh file for Catalina version of mac however when I run flutter doctor or flutter precache, I receive zsh: command not found: flutter. NOTE: I managed to get through these steps previously and set up android studio however I had issues when I tried to connect the simulator for Xcode and now I have had to start again.
UPDATE: When running 'flutter' or 'flutter doctor', I receive this error: Error when reading '../../../../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory and it says that pub upgrade failed after 10 tries.
How would I solve this?
When I run ls -a in the home directory, I see that there's a .bash_profile, a .zshrc file and a .zprofile (which I created previously) in there. Is this related to the problem?
This looks like you don't have flutter on your PATH in ZSH.
Open your .zshrc file in your terminal with
nano .zshrc
You should see the following at the top of the file
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
Add on the second line the path to the bin directory of your flutter SDK location, like mine:
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/joaosoares/Projects/flutter/bin

Meteor 0.3.9 on Windows XP exits with code: -1073741819

I have installed recently Meteor 0.3.9 on Windows XP (msi installer from: http://win.meteor.com/) and when I try to run (under CMD):
meteor create --example leaderboard
cd leaderboard
meteor
I get:
[[[[[ C:\temp\leaderboard ]]]]]
Running on: http://localhost:3000/
Exited with code: -1073741819
Exited with code: -1073741819
Exited with code: -1073741819
Your application is crashing. Waiting for file change.
How can I fix that error?
At first I tried running the following command on directory C:\Program Files\meteor,
where I installed meteor. No luck. Then I tried running the same command on directory
C:\ the main root on my Windows Vista Ultimate. I keyed in meteor create myapp
then myapp directory is created.
To run your new app, change directory to myapp, (CD myapp) then type meteor, followed by Enter.
Go to your browser and type localhost:3000
and voila! You will be able to see "Hello World!"
Try not running it on directory temp.

how to run apk file in android

I try to run apk file in android, i follow these steps
1. First get the Android SDK and unzip it somewhere on your hard drive
2. Add SDK_ROOT to your system variables pointing to /tools folder under the sdk
3. Run the emulator
4. Copy the apk file to /tools folder
5. Change directory to /tools and run from commandline $adb install your_application.apk 6. Now check applications list in the emulator and you should see the new application installed and ready.
but i get this type of error :
" [2011-01-11 17:02:15 - Logcat]device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:284)
at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527) "
can you help me any one.... ?
Try to start first the emulator. Navigate to the $SDK_ROOT/tools directory and execute the file 'emulator.exe'. Wait couple of minutes until it loads. Now run :
$adb install your_application.apk
If all went without errors then you should be seeing your newly installed APK on the emulator.