Electron forge: github publisher doesn't create any release - electron

I created an electron app using yarn create electron-app my-app which I am hosting on github (https://github.com/amblafont/essai-electron). I updated package.json and forge.config.js to add the github publisher. But it doesn't create any new github release.
yarn run publish doesn't throw any error (see the log below), but it doesn't create any release on github. What am I doing wrong?
$ electron-forge publish
✔ Checking your system
✔ Loading configuration
✔ Resolving publish targets
› Publishing to the following targets: github
✔ Running make command
✔ Loading configuration
✔ Resolving make targets
› Making for the following targets: zip
✔ Running package command
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ Packaging application
✔ Packaging for x64 on linux [1s]
✔ Running postPackage hook
✔ Running preMake hook
✔ Making distributables
✔ Making a zip distributable for linux/x64 [9s]
✔ Running postMake hook
› Artifacts available at: ***/my-app/out/make
✔ Publishing distributables
✔ [publisher-github] Running the publish command
› Uploading distributable (1/1 to v1.0.0)

Related

Is it possible(if yes, what is the best way) to build electron app having node-hid as a dependency on linux using docker for windows 32bit?

Using docker image electronuserland/builder:wine trying to build:
./node_modules/.bin/electron-builder --win --ia32
outputs:
• loaded configuration file=/project/electron-builder.yml
• writing effective config file=build/builder-effective-config.yaml
• rebuilding native dependencies dependencies=node-hid#2.1.1, sqlite3#4.2.0, usb-detection#4.10.0 platform=win32 arch=ia32
• install prebuilt binary name=usb-detection version=4.10.0 platform=win32 arch=ia32
• install prebuilt binary name=node-hid version=2.1.1 platform=win32 arch=ia32
⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
cause=exit status 1
errorOut=prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for cached prebuild # /root/.npm/_prebuilds/c5dfd1-node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install http request GET https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install http 404 https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.1.1 runtime=electron arch=ia32 libc= platform=win32)
command=/usr/local/bin/node /project/node_modules/prebuild-install/bin.js --platform=win32 --arch=ia32 --target=8.1.1 --runtime=electron --verbose --force
workingDir=/project/node_modules/node-hid
What am I missing? Or is it actually required in this case to build app on windows machine?

Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported - Windows10

I am a beginner and learning appium tool.
Trying to start the appium session and getting an error
An unknown server-side error occurred while processing the command. Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported
Using Window 10.
Yes, I have met this problem, too.
However, these environment variables have been set correctly. At last, I solved this problem - It is very simple.
In main UI, Edit Configurations, set requested variables and restart.
Problem solved.
I have also run into this issue. What I noticed is that most time is you are actually setting your ANDROID_HOME but you are missing a spelling in the value. Check and ensure you copy the path instead of typing the path because when you type it you are likely going to misspell android spelling. So, copy the path of your Android installation into your system variable's Name/Value pair.
I had the same problem. All the environment variables were set right already. I found the root cause to be the unfinished process running in port 4723 at Host 0.0.0.0 when I force quit the Appium Desktop application. Once I killed the process running at this address, I did not see the problem anymore
Link to kill the address in use: Appium Question. If "listen eaddrinuse: address already in use", how to stop it? why it didn't stop?
If you have just updated the rc file with ANDROID_HOME, be sure to restart the cli appium server in a new window. A previously launched appium server will keep complaining.
I am facing the same issue in Mac.
I am trying to launch Appium programmatically which is successful through AppiumDriverLocalService.
Once Appium is launched, and all the capabilities are loaded, when I am trying to set the driver (AppriumDriver), it gives me the error as "org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read https://developer.android.com/studio/command-line/variables for more detail"
Problem :
An unknown server-side error occurred while processing the command. Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported
If your typing appium-doctor on terminal will get error on path ANDROID_HOME -> X and not check just like this :
info AppiumDoctor Appium Doctor v.1.16.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor ✔ The Node.js binary was found at: /Users/wiwa/.nvm/versions/node/v16.17.0/bin/node
info AppiumDoctor ✔ Node version is 16.17.0
info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed in: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage. Installed version is: 0.38.0
info AppiumDoctor ✔ HOME is set to: /Users/wiwa
info AppiumDoctor ✖ ANDROID_HOME is set to: /Users/wiwa/Library/Android/sdk
info AppiumDoctor ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
info AppiumDoctor Checking adb, android, emulator
info AppiumDoctor 'adb' is in /Users/wiwa/Library/Android/sdk/platform-tools/adb
info AppiumDoctor 'android' is in /Users/wiwa/Library/Android/sdk/tools/android
info AppiumDoctor 'emulator' is in /Users/wiwa/Library/Android/sdk/emulator/emulator
info AppiumDoctor ✔ adb, android, emulator exist: /Users/wiwa/Library/Android/sdk
info AppiumDoctor ✔ 'bin' subfolder exists under '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home'
info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor ✖ opencv4nodejs cannot be found.
info AppiumDoctor ✔ ffmpeg is installed at: /usr/local/bin/ffmpeg. ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers
WARN AppiumDoctor ✖ mjpeg-consumer cannot be found.
WARN AppiumDoctor ✖ set-simulator-location is not installed
WARN AppiumDoctor ✖ idb and idb_companion are not installed
WARN AppiumDoctor ✖ applesimutils cannot be found
info AppiumDoctor ✔ ios-deploy is installed at: /Users/wiwa/.nvm/versions/node/v16.17.0/bin/ios-deploy. Installed version is: 1.11.4
WARN AppiumDoctor ✖ bundletool.jar cannot be found
WARN AppiumDoctor ✖ gst-launch-1.0 and/or gst-inspect-1.0 cannot be found
info AppiumDoctor ### Diagnostic for optional dependencies completed, 7 fixes possible. ###
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the following manually:
WARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md
WARN AppiumDoctor ➜ mjpeg-consumer module is required to use MJPEG-over-HTTP features. Please install it with 'npm i -g mjpeg-consumer'.
WARN AppiumDoctor ➜ set-simulator-location is needed to set location for Simulator. Please read https://github.com/lyft/set-simulator-location to install it
WARN AppiumDoctor ➜ Why idb is needed and how to install it: https://github.com/appium/appium-idb
WARN AppiumDoctor ➜ Why applesimutils is needed and how to install it: http://appium.io/docs/en/drivers/ios-xcuitest/
WARN AppiumDoctor ➜ bundletool.jar is used to handle Android App Bundle. Please read http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ to install it
WARN AppiumDoctor ➜ gst-launch-1.0 and gst-inspect-1.0 are used to stream the screen of the device under test. Please read https://appium.io/docs/en/writing-running-appium/android/android-screen-streaming/ to install them and for more details
info AppiumDoctor
info AppiumDoctor ###
info AppiumDoctor
info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have been applied!
info AppiumDoctor
so for solution if your using mac or linux use .bashrc or .zshrc just typing :
source ~/.bashrc
or
source ~/.zshrc
And check again use appium-doctorif already check for ANDROID_HOME its already solved without error :)
You are missing on the environment variables, if you have installed android studio. Just set the path in the environment variables.
Here is a link, follow this:
http://www.automationtestinghub.com/setup-android-environment-variables/

Jenkins Android emulator is running because of the outdated SDK. How I can update it on jenkins

I am using jenkins on my local system and added an android emulator plugin but it is giving me error for the outdated SDK.
> C:\Program Files\Git\bin\git.exe rev-list --no-walk f04a1c2fe717dc9b6a3a329636f418e3dc853585 # timeout=10
[android] Outdated SDK Tools found. Upgrading from '26.1.1' to 'build 6609375'
[android] Android SDK installation failed
[android] hudson.plugins.android_emulator.SdkInstallationException: Failed to download Android SDK
at hudson.plugins.android_emulator.SdkInstaller.doInstall(SdkInstaller.java:91)
at hudson.plugins.android_emulator.SdkInstaller.install(SdkInstaller.java:72)
at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:278)
at hudson.model.Build$BuildExecution.doRun(Build.java:157)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Caused by: java.io.IOException: Failed to donwload SDK archive
at hudson.plugins.android_emulator.SdkInstaller.installBasicSdk(SdkInstaller.java:189)
at hudson.plugins.android_emulator.SdkInstaller.doInstall(SdkInstaller.java:89)
... 8 more
Finished: NOT_BUILT
I'm dealing with the exactly same issue on ubuntu server now.
What I've done - manually downloaded sdk tools and installed them in my /usr/lib/android-sdk folder
wget -O sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
sudo apt install unzip
unzip sdk-tools.zip
and this issue disappeared on jenkins for me now.
Follow steps:
Manage Jenkins -> Configure System -> Scroll to bottom
un-check the Automatically install Android components when required

Electron app do not start but electron-builder (dist) is ok

Can't figure what's wrong in my electron project. Starting with electron . will fail with one native module (pkcs11js). See image :
But running npm run dist will build installer just fine, and running this installer work's fine and app is starting/workin like charm !
PS C:\Users\esa\devel\netauth\client> npm run dist
> Yubiconn2#1.0.0 dist C:\Users\esa\devel\netauth\client
> electron-builder -w --x64
• electron-builder version=21.2.0 os=10.0.18362
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• rebuilding native dependencies dependencies=pkcs11js#1.0.18 platform=win32 arch=x64
• packaging platform=win32 arch=x64 electron=6.0.7 appOutDir=dist\win-unpacked
• building target=nsis file=dist\Yubiconn2 Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false
• building block map blockMapFile=dist\Yubiconn2 Setup 1.0.0.exe.blockmap
and this was fine before today when I upgraded all outdated npm packages up-to-date. And nodejs too. This is Win10 env. My OsX env will work without any problem.
I have tried :
rm -rf node_modules; npm install
npm rebuild
even installing electron-rebuild and running .\node_modules\.bin\electron-rebuild
I understand electron-builder will rebuild all native dependencies for distribution. How to make same with development env (electron . or npm start)
I think you need to update node.js. See the part of your error about NODE_MODULE_VERSION
This explains the value of NODE_MODULE_VERSION https://nodejs.org/en/download/releases/#ref-1

How to do complete Appium Setup in Mac OS High Sierra (Version : 10.13.4)

Please help me in configuring appium from the terminal. Please provide the complete steps to do it along with the software versions.
This is a little guide I've created for setting up Appium on Mac, but I'm sure you can find a lot of tutorials on this just by googling it.
First, you will need to download Android Studio: https://developer.android.com/studio/
After that, set ANDROID_HOME path in your ".bash_profile" file:
Navigate to home directory (type "cd" anywhere in terminal to go to home directory), type "ls -a" to list all files, ".bash_profile" file should be listed (if it's not listed create it with "touch .bash_profile"), add following lines to ".bash_profile" file:
Path to ANDROID_HOME
export ANDROID_HOME=/Users//Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
after saving file type "source .bash_profile" for changes to take effect.
Homebrew
HomeBrew is a command line package manager for OS X. It is not officially recognized, but it has become a standard de facto for the distributions of tons of useful tools. Install it by running following command from Terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)". For more info about Homebrew visit: https://brew.sh/
Python 2.7
Python should be pre-installed on macOS. To check if Python is installed type "python --version" in Terminal, output should show currently installed version (e.g. "Python 2.7.10"). If Python is not installed for some reason, you can install latest version with command "brew install python"
Appium and Appium dependencies
Install Appium desktop application from here http://appium.io/ (e.g. "appium-desktop-1.2.6-mac.zip")
Install carthage which is an Appium dependency with command "brew install carthage --HEAD" (if you want to see where carthage is installed type "which carthage")
Install pip package manager with command "sudo easy_install pip"
Install Appium Python client (if you want Java, Ruby, C# client, just change it, instead of Python) with command "pip install Appium-Python-Client"
Install Node.js and NPM with command "brew install node" (to verify node and npm are installed type "node -v" and "npm -v" in terminal)
Install appium doctor with command "sudo npm install appium-doctor -g". Appium doctor will tell you if there are some missing dependencies, to use it type "appium-doctor" in terminal.
Run commands "sudo npm install -g authorize-ios" and "sudo authorize-ios"
Set JAVA_HOME path in your ".bash_profile" file:
Navigate to home directory (type "cd" anywhere in terminal to go to home directory), type "ls -a" to list all files, ".bash_profile" file should be listed, edit ".bash_profile" with the next lines:
Path to Java
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH
after saving file type "source .bash_profile" for changes to take effect
If everything is set up correctly, when you run appium-doctor from Terminal you will see something like this:
username$ appium-doctor
info AppiumDoctor Appium Doctor v.1.4.3
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor ✔ The Node.js binary was found at:
/usr/local/bin/node
info AppiumDoctor ✔ Node version is 8.9.0
info AppiumDoctor ✔ Xcode is installed at:
/Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed.
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor ✔ HOME is set to: /Users/majdukovic
info AppiumDoctor ✔ ANDROID_HOME is set to:
/Users/majdukovic/Library/Android/sdk
info AppiumDoctor ✔ JAVA_HOME is set to:
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
info AppiumDoctor ✔ adb exists at:
/Users/majdukovic/Library/Android/sdk/platform-tools/adb
info AppiumDoctor ✔ android exists at:
/Users/majdukovic/Library/Android/sdk/tools/android
info AppiumDoctor ✔ emulator exists at:
/Users/majdukovic/Library/Android/sdk/tools/emulator
info AppiumDoctor ✔ Bin directory of $JAVA_HOME is set
info AppiumDoctor ### Diagnostic completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor Everything looks good, bye!
info AppiumDoctor
username$

Resources