flexn-io / renative

🚀🚀🚀 Unified Development Platform for iOS, tvOS, Android, Android TV, Android Wear, Web, Tizen TV, Tizen Watch, Tizen Mobile, LG webOS, macOS/OSX, Windows, KaiOS, FirefoxOS Firefox TV platforms
https://renative.org
MIT License
1.82k stars 180 forks source link

rnv run for webOS not working on Ubuntu #566

Closed Emzawadzki closed 7 months ago

Emzawadzki commented 4 years ago

Describe the bug Running on Ubuntu 20.04, renative current version (0.30.4) results in error. Tried on new project, created from renative-template-hello-world template, with no additional changes.

webOS emulator is installed in /usr/local/share/webOS_TV_SDK (default install location)

~/.rnv/renative.json file contents (only WEBOS_SKD) changed vs default one:

{
    "sdks": {
        "ANDROID_SDK": "/Users/<USER>/Library/Android/sdk",
        "ANDROID_NDK": "/Users/<USER>/Library/Android/sdk/ndk-bundle",
        "IOS_SDK": "No need. Just install Xcode",
        "TIZEN_SDK": "/Users/<USER>/tizen-studio",
        "WEBOS_SDK": "/usr/local/share/webOS_TV_SDK",
        "KAIOS_SDK": "/Applications/Kaiosrt.app"
    },
    "defaultTargets": {
        "android": "Nexus_5X_API_26",
        "androidtv": "Android_TV_720p_API_22",
        "androidwear": "Android_Wear_Round_API_28",
        "ios": "iPhone 6",
        "tvos": "Apple TV 4K",
        "tizen": "T-samsung-5.0-x86",
        "tizenwatch": "W-5.0-circle-x86",
        "tizenmobile":"mobile-5.0-x86",
        "webos": "emulator"
    }
}

To Reproduce

$ rnv new

Pick renative-template-hello-world

$ rnv run -p webos

Expected behavior Seeing hello world project on emulator

Screenshots or copy&paste

rnv status

results in:

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│        ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗       │
│        ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝       │
│        ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗         │
│        ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝         │
│        ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗       │
│        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝       │
│                                                                              │
│        Version: 0.30.4                                                       │
│        https://renative.org                                                  │
│        🚀 Firing up!...                                                      │
│        $ rnv status                                                          │
│        Start Time: 9/2/2020, 6:19:41 PM                                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

(node:16002) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16002) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:16002) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
$ rnv status - cli - Starting!
$ rnv status - _startBuilder:false - Starting!
$ rnv status - checkAndMigrateProject - Starting!
$ rnv status - listAppConfigsFoldersSync:undefined - Starting!
$ rnv status - _migrateProjectSoft - Starting!
$ rnv status - parseRenativeConfigs - Starting!
$ rnv status - matchAppConfigID:undefined
$ rnv status - getWorkspaceDirPath - Starting!
$ rnv status - loadPluginTemplates - Starting!
$ rnv status - _findAndSwitchAppConfigDir:undefined - Starting!
$ rnv status - configureRnvGlobal - Starting!
$ rnv status - _execute:status:null - Starting!

 $ rnv status - Done! 🚀
┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  SUMMARY | 9/2/2020, 6:19:41 PM                                          │
│  $ rnv status                                                                │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 0.30.4                                                    │
│  Project Name ($package.name): testProject                                   │
│  Project Version ($package.version): 0.1.0                                   │
│  Workspace ($.workspaceID): rnv                                              │
│  App Config (-c): helloworld                                                 │
│  Build Scheme (-s): debug                                                    │
│  Supported Platforms: android, androidtv, androidwear,                       │
│  chromecast, firefoxos, firefoxtv, ios, kaios, macos, tizen, tizenmobile,    │
│  tizenwatch, tvos, web, web-next, webos, windows                             │
│  Env Info: linux | x64 | node v14.6.0                                        │
│  Executed Time: 0h:0m:0s:61ms                                                │
│                                                                              │
│  All good as đŸĻ„                                                              │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
rnv run -p webos

results in:

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│        ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗       │
│        ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝       │
│        ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗         │
│        ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝         │
│        ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗       │
│        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝       │
│                                                                              │
│        Version: 0.30.4                                                       │
│        https://renative.org                                                  │
│        🚀 Firing up!...                                                      │
│        $ rnv run -p webos                                                    │
│        Start Time: 9/2/2020, 6:21:26 PM                                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

(node:16070) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16070) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:16070) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
$ rnv run -p webos - cli - Starting!
$ rnv run -p webos - _startBuilder:false - Starting!
$ rnv run -p webos - checkAndMigrateProject - Starting!
$ rnv run -p webos - listAppConfigsFoldersSync:undefined - Starting!
$ rnv run -p webos - _migrateProjectSoft - Starting!
$ rnv run -p webos - parseRenativeConfigs - Starting!
$ rnv run -p webos - matchAppConfigID:undefined
$ rnv run -p webos - getWorkspaceDirPath - Starting!
$ rnv run -p webos - loadPluginTemplates - Starting!
$ rnv run -p webos - _findAndSwitchAppConfigDir:undefined - Starting!
$ rnv run -p webos - checkAndMigrateProject - Starting!
$ rnv run -p webos - listAppConfigsFoldersSync:undefined - Starting!
$ rnv run -p webos - _migrateProjectSoft - Starting!
$ rnv run -p webos - parseRenativeConfigs - Starting!
$ rnv run -p webos - matchAppConfigID:undefined
$ rnv run -p webos - getWorkspaceDirPath - Starting!
$ rnv run -p webos - loadPluginTemplates - Starting!
$ rnv run -p webos - _findAndSwitchAppConfigDir:undefined - Starting!
$ rnv run -p webos - checkAndCreateProjectPackage - Starting!
$ rnv run -p webos - configureRnvGlobal - Starting!
$ rnv run -p webos - checkIfTemplateInstalled - Starting!
$ rnv run -p webos - fixRenativeConfigsSync - Starting!
$ rnv run -p webos - checkAndCreateGitignore - Starting!
$ rnv run -p webos - configureNodeModules:undefined:undefined - Starting!
$ rnv run -p webos - applyTemplate:renative-template-hello-world=>undefined: - Starting!
$ rnv run -p webos - _applyTemplate | current:renative-template-hello-world | selected:undefined - Starting!
$ rnv run -p webos - setAppConfig:helloworld - Starting!
$ rnv run -p webos - _findAndSwitchAppConfigDir:helloworld - Starting!
$ rnv run -p webos - generateLocalConfig:undefined:/home/mzawadzki/projects/renative-test/testProject/renative.local.json - Starting!
$ rnv run -p webos - getWorkspaceDirPath - Starting!
$ rnv run -p webos - generateLocalConfig:false:/home/mzawadzki/projects/renative-test/testProject/renative.local.json - Starting!
$ rnv run -p webos - configureEntryPoints - Starting!
$ rnv run -p webos - configurePlugins - Starting!
$ rnv run -p webos - configurePlugins:false
$ rnv run -p webos - versionCheck - Starting!
$ rnv run -p webos - versionCheck:rnvRunner:0.30.4,rnvProject:0.30.4
$ rnv run -p webos - configureNodeModules:undefined:undefined - Starting!
$ rnv run -p webos - checkCrypto - Starting!
$ rnv run -p webos - updateConfig:helloworld - Starting!
$ rnv run -p webos - setAppConfig:helloworld - Starting!
$ rnv run -p webos - _findAndSwitchAppConfigDir:helloworld - Starting!
$ rnv run -p webos - generateLocalConfig:undefined:/home/mzawadzki/projects/renative-test/testProject/renative.local.json - Starting!
$ rnv run -p webos - getWorkspaceDirPath - Starting!
ℹī¸  $ rnv run -p webos - NOTE: Current App Config: helloworld
$ rnv run -p webos - _execute:run:null - Starting!
$ rnv run -p webos - executePipe:run:before - Starting!
$ rnv run -p webos - buildHooks - Starting!
$ rnv run -p webos - rnvRun:webos - Starting!
$ rnv run -p webos - isPlatformSupported:webos - Starting!
$ rnv run -p webos - checkAndConfigureSdks:webos - Starting!
$ rnv run -p webos - checkAndConfigureWebosSdks:webos - Starting!
$ rnv run -p webos - isBuildSchemeSupported:webos - Starting!
$ rnv run -p webos - _rnvRunWithPlatform:webos - Starting!
$ rnv run -p webos - _rnvRunWithPlatform:webos:8088:emulator:undefined
$ rnv run -p webos - checkSdk - Starting!
$ rnv run -p webos - _isSdkInstalled: webos - Starting!
$ rnv run -p webos - configureIfRequired:webos - Starting!
$ rnv run -p webos - createPlatformBuild:webos - Starting!
$ rnv run -p webos - cli - Starting!
$ rnv run -p webos - _startBuilder:true - Starting!
$ rnv run -p webos - _execute:configure:null - Starting!
$ rnv run -p webos - executePipe:configure:before - Starting!
$ rnv run -p webos - buildHooks - Starting!
$ rnv run -p webos - rnvConfigure:webos:webos - Starting!
$ rnv run -p webos - _checkAndCreatePlatforms:webos - Starting!
$ rnv run -p webos - copyRuntimeAssets - Starting!
$ rnv run -p webos - parseFonts - Starting!
$ rnv run -p webos - _copySharedPlatform:webos - Starting!
$ rnv run -p webos - generateRuntimeConfig - Starting!
$ rnv run -p webos - overrideTemplatePlugins - Starting!
$ rnv run -p webos - parsePlugins:webos - Starting!
$ rnv run -p webos - configureWebOSProject - Starting!
$ rnv run -p webos - copyAssetsFolder:webos - Starting!
$ rnv run -p webos - parsePlugins:webos - Starting!
$ rnv run -p webos - configureProject:webos - Starting!
$ rnv run -p webos - copyBuildsFolder:webos - Starting!
$ rnv run -p webos - copyTemplatePluginsSync:webos - Starting!
$ rnv run -p webos - parsePlugins:webos - Starting!
$ rnv run -p webos - executePipe:configure:after - Starting!
$ rnv run -p webos - buildHooks - Starting!
$ rnv run -p webos - _configureHostedIfRequired:webos - Starting!
$ rnv run -p webos - runWebOS:webos:emulator - Starting!
$ rnv run -p webos - runWebOS:webos:emulator:true
✔ Executing: /usr/local/share/webOS_TV_SDK/CLI/bin/ares-package -o /home/mzawadzki/projects/renative-test/testProject/platformBuilds/helloworld_webos/output /home/mzawadzki/projects/renative-test/testProject/platformBuilds/helloworld_webos/public -n
✔ Executing: /usr/local/share/webOS_TV_SDK/CLI/bin/ares-device-info -D
$ rnv run -p webos - launchWebOSimulator - Starting!
┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  SUMMARY | 9/2/2020, 6:21:27 PM                                          │
│  $ rnv run -p webos                                                          │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 0.30.4                                                    │
│  Project Name ($package.name): testProject                                   │
│  Project Version ($package.version): 0.1.0                                   │
│  Workspace ($.workspaceID): rnv                                              │
│  Platform (-p): webos                                                        │
│  Engine ($.platforms.webos.engine): engine-rn-web                            │
│  App Config (-c): helloworld                                                 │
│  Build Scheme (-s): debug                                                    │
│  Supported Platforms: android, androidtv, androidwear,                       │
│  chromecast, firefoxos, firefoxtv, ios, kaios, macos, tizen, tizenmobile,    │
│  tizenwatch, tvos, web, web-next, webos, windows                             │
│  Env Info: linux | x64 | node v14.6.0                                        │
│  Executed Time: 0h:0m:1s:173ms                                               │
│                                                                              │
│ 🛑  $ rnv run -p webos - ERRROR! Can't find emulator at path: /usr/local/share/webOS_TV_SDK/Emulator/v4.0.0/LG_webOS_TV_Emulator_RCU.app
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Desktop (please complete the following information):

Additional context rnv seems to look for Mac application instead of using Linux one, here's also a ls from emulator dir:

(...):~$ ls /usr/local/share/webOS_TV_SDK/Emulator/v4.0.0/
 AppManager-1.0.jar                               LG_webOS_TV_Emulator.sh     vm_register.sh
 AppManager.sh                                    LG_webOS_TV_Emulator.vbox   vm_remove.sh
 DTVEmulator.xpm                                  LG_webOS_TV_Emulator.vmdk   webos_emul
'LGE Open Source Software Notice-Emulator.html'   lib
 LG_webOS_TV_Emulator_linux.jar                   vmemulator.properties
Emzawadzki commented 4 years ago

As far as I can see Ubuntu path is not being handled on webOS right now according to https://github.com/pavjacko/renative/blob/master/packages/rnv/src/platformTools/webos/index.js#L51 , am I right?

Emzawadzki commented 4 years ago

I managed to run app by simply running emulator manually before rnv run command. I'll leave this issue as a reminder to add to documentation some info about that

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

pauliusguzas commented 1 year ago

@Emzawadzki thanks for reporting this issue, is this still reproduced on latest rnv version?

GabrieleKaceviciute commented 8 months ago

@Emzawadzki Not reproduced it on 1.0.0-rc.10. Could you try it on this version?

GabrieleKaceviciute commented 7 months ago

Closing as issue was resolved, feel free to reopen if needed