• Summer Armitage 5
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi everyone,
after completed this trailhead: 
https://trailhead.salesforce.com/projects/mobilesdk_setup_dev_tools  for "Set Up Your Mobile SDK Developer Tools", I tried to develope my first hybrid app following this guide:
https://trailhead.salesforce.com/trails/mobile_sdk_intro/modules/mobile_sdk_hybrid/units/mobilesdk_hybrid_getting_started
but i'm having some trouble.

This is my command: 

C:\Users\iodicepa\Desktop\Mobile_SDK_projects>forcedroid create
Enter your application type (native, native_kotlin, react_native, hybrid_local,
hybrid_remote): hybrid_remote
Enter your application name: myapp
Enter the package name for your app (com.mycompany.myapp): com.paco.myapp
Enter your organization name (Acme, Inc.): paco
Enter the start page for your app: /apex/myRemote
Enter output directory for your app (leave empty for the current directory):


and this the error:

********************************************************************************

*
*   Creating android hybrid_remote application using Salesforce Mobile SDK
*     with app name:        myapp
*          package name:    com.paco.myapp
*          organization:    paco
*
*     in:                   myapp
*
*     from template repo:   https://github.com/forcedotcom/SalesforceMobileSDK-T
emplates#v5.3.0
*          template path:   HybridRemoteTemplate
*          start page:      /apex/myRemote
*          plugin repo:     https://github.com/forcedotcom/SalesforceMobileSDK-C
ordovaPlugin#v5.3.0
*
********************************************************************************


Creating a new cordova project.
C:\Users\iodicepa\Desktop\Mobile_SDK_projects\myapp C:\Users\iodicepa\Desktop\Mo
bile_SDK_projects
C:\Users\iodicepa\Desktop\Mobile_SDK_projects\myapp
`-- shelljs@0.7.0
  +-- glob@7.1.2
  | +-- fs.realpath@1.0.0
  | +-- inflight@1.0.6
  | | `-- wrappy@1.0.2
  | +-- inherits@2.0.3
  | +-- minimatch@3.0.4
  | | `-- brace-expansion@1.1.8
  | |   +-- balanced-match@1.0.0
  | |   `-- concat-map@0.0.1
  | +-- once@1.4.0
  | `-- path-is-absolute@1.0.1
  +-- interpret@1.0.4
  `-- rechoir@0.6.2
    `-- resolve@1.4.0
      `-- path-parse@1.0.5

C:\Users\iodicepa\Desktop\Mobile_SDK_projects
C:\Users\iodicepa\Desktop\Mobile_SDK_projects\myapp C:\Users\iodicepa\Desktop\Mo
bile_SDK_projects
Using cordova-fetch for cordova-android@6.2.3
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.paco.myapp
        Name: myapp
        Activity: MainActivity
        Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android@6.2.3
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the pro
ject
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android gr
eater than 4.0. If you have a previous platform version, you do *not* need this
plugin since the whitelist will be built in.

Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@~6.2.3 into config.xml file ...
C:\Users\iodicepa\Desktop\Mobile_SDK_projects
C:\Users\iodicepa\Desktop\Mobile_SDK_projects\myapp C:\Users\iodicepa\Desktop\Mo
bile_SDK_projects
C:\Users\iodicepa\Desktop\Mobile_SDK_projects
forcedroid failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobi
leSDK-CordovaPlugin#v5.3.0 --force
Error: Failed to fetch plugin https://github.com/forcedotcom/SalesforceMobileSDK
-CordovaPlugin#v5.3.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:204:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:891:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:1
1)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:497:12)
npm WARN addRemoteGit  git+https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git#v5.3.0 resetting remote C:\Users\iodicepa\AppData\Roaming\npm-ca
che\_git-remotes\git-https-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlu
gin-git-v5-3-0-33807aab because of error: { Error: Command failed: git -c core.l
ongpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:204:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:891:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:1
1)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:497:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.ori
gin.url' }
npm ERR! git clone --template=C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-r
emotes\_templates --mirror https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-remotes\git-htt
ps-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v5-3-0-33807aab:
 Cloning into bare repository 'C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-
remotes\git-https-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v
5-3-0-33807aab'...
npm ERR! git clone --template=C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-r
emotes\_templates --mirror https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-remotes\git-htt
ps-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v5-3-0-33807aab:
 fatal: early EOF
npm ERR! git clone --template=C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-r
emotes\_templates --mirror https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-remotes\git-htt
ps-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v5-3-0-33807aab:
 fatal: The remote end hung up unexpectedly
npm ERR! git clone --template=C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-r
emotes\_templates --mirror https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-remotes\git-htt
ps-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v5-3-0-33807aab:
 fatal: index-pack failed
npm ERR! git clone --template=C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-r
emotes\_templates --mirror https://github.com/forcedotcom/SalesforceMobileSDK-Co
rdovaPlugin.git C:\Users\iodicepa\AppData\Roaming\npm-cache\_git-remotes\git-htt
ps-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlugin-git-v5-3-0-33807aab:
 error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "https://github.com/forcedotcom/Sa
lesforceMobileSDK-CordovaPlugin#v5.3.0" "--save"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\io
dicepa\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github
.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin.git C:\Users\iodicepa\AppData
\Roaming\npm-cache\_git-remotes\git-https-github-com-forcedotcom-SalesforceMobil
eSDK-CordovaPlugin-git-v5-3-0-33807aab
npm ERR! Cloning into bare repository 'C:\Users\iodicepa\AppData\Roaming\npm-cac
he\_git-remotes\git-https-github-com-forcedotcom-SalesforceMobileSDK-CordovaPlug
in-git-v5-3-0-33807aab'...
npm ERR! fatal: early EOF
npm ERR! fatal: The remote end hung up unexpectedly
npm ERR! fatal: index-pack failed
npm ERR! error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 1
0054
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\iodicepa\Desktop\Mobile_SDK_projects\myapp\node_modules\np
m-debug.log



I tried different cordova version as 6.2.0, 6.3.0, 6.4.0, 7.0.0 but i have the same error. i also tried with differed  connection.

Thanks in advance
Hi, I'm trying to complete the Mobile SDK Trail on Trailhead. Is it possible to complete this trail on a PC?
Hi!

I'm currently trying to work my way through the Trailhead "Get Started with Hybrid Development", but am having problems when I attempt to "forcedroid create".

When it gets to "Installing "cordova-plugin-whitelist" for android" it fails with:
 
Failed to install 'cordova-plugin-whitelist':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: TypeError: Path must be a string. Received undefined



This error is not imediately fatal, but after a time I see:
 
Installing "cordova-plugin-whitelist" for android
Failed to install 'cordova-plugin-whitelist':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Failed to install 'com.salesforce':TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\lib\check_reqs.js:177:42
at _fulfilled (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:796:13)
at D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:857:14
at runSingle (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\tutorials\AndroidStudioProjects\THA\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
D:\tutorials\AndroidStudioProjects
forcedroid create failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.0.0 --force
Error: Path must be a string. Received undefined



Whereas, this last bit is fatal.

FWIW,
OS: Windows XP SP3
Java: 1.8.0_121
Node: 5.12.0
Npm: 4.2.0
Cordovoa: 6.5.0

ANDROID_HOME: C:\devtools\Android\sdk
ANDROID_SDK_HOME: C:\devtools\Android\sdk
JAVA_HOME: C:\devtools\Java\jdk1.8.0_121
JDK_HOME: %JAVA_HOME%
JRE_HOME: %JAVA_HOME%\jre
CLASSPATH: .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
User PATH: %JAVA_HOME%\bin;C:\Documents and Settings\Brian Kessler\Application Data\npm
System PATH: C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Pinnacle\Shared Files\InstantCDDVD\;C:\WINXPSP3\system32\WindowsPowerShell\v1.0;C:\Program Files\Skype\Phone\;C:\Program Files\Kensington\TrackballWorks;C:\devtools\Git\cmd;C:\devtools\Git\GitExtensions\;C:\devtools\nodejs\;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools

Any ideas what is wrong or how to fix this?
I'm trying to go through "Trailhead Native Android" and I'm getting stuck in the first chapter on "forcedroid create". the error I'm getting after i enter the output directory and the error even appears when i leave it blank.
error i am getting from the command line is
"forcedroid create failed
Command failed: git clone --branch v5.0.0 --single-branch --depth 1 --recurse-submodules https://github.com/forcedotcom/SalesforceMobileSDK-Templates C:\Users\Owner\Documents\Android project\tmp84510\SalesforceMobileSDK-Templates 
'git' is not recognized as an internal or external command,
operable program or batch file."