Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulator show black screen #261

Open
trantung998 opened this issue Nov 28, 2015 · 4 comments
Open

simulator show black screen #261

trantung998 opened this issue Nov 28, 2015 · 4 comments

Comments

@trantung998
Copy link

hi i'm try to build hello world project, but the simulator show nothing
this is log:

$ devkit serve
           [serve]  serving at http://localhost:9200/ and http://192.168.1.64:92                                                                                                                00/
Error: ENOENT: no such file or directory, stat 'C:\Users\melod\mygame\resources\                                                                                                                icons\defaultIcon.png'
    at Error (native)
Error: ENOENT: no such file or directory, stat 'D:\devkit\projects\helloworld\re                                                                                                                sources\icons\defaultIcon.png'
    at Error (native)
Error: ENOENT: no such file or directory, stat 'D:\devkit\projects\helloworld\re                                                                                                                sources\icons\defaultIcon.png'
    at Error (native)
Error: ENOENT: no such file or directory, stat 'C:\Users\melod\mygame\resources\                                                                                                                icons\defaultIcon.png'
    at Error (native)
     [build-queue]  starting build D:\devkit\projects\helloworld native-ios
Error: ENOENT: no such file or directory, stat 'D:\devkit\projects\helloworld\re                                                                                                                sources\icons\defaultIcon.png'
    at Error (native)
           [build]  starting build at Sat Nov 28 2015 14:53:10 GMT+0700 (SE Asia                                                                                                                 Standard Time)
            [apps]  D:\devkit\projects\helloworld\manifest.json
          [devkit]
           [build]  Prebuild phase completed for helloworld
                        build for: native-ios           scheme: debug
          [devkit]
                     --- start config ---
                                         appPath: D:\devkit\projects\helloworld
                                           debug: true
                                          scheme: debug
                                          target: native-ios
                                     imports:
                                               0: devkit-simulator-client
                                               1: devkit-view-inspector
                                      schemePath: build\debug
                                      outputPath: D:\devkit\projects\helloworld\                                                                                                                build\debug\simulator
                                    jsioPath:
                                 clientPaths:
                         devkit-simulator-client: C:\Users\melod\AppData\Roaming                                                                                                                \npm\node_modules\devkit\modules\devkit-simulator-client\client
                           devkit-view-inspector: C:\Users\melod\AppData\Roaming                                                                                                                \npm\node_modules\devkit\modules\devkit-view-inspector\simulator
                                      sdkVersion: 3.1.1
                                       isTestApp: undefined
                                     isSimulated: true
                                   simulator:
                                        deviceId: sim1
                                      deviceType: iphone6
                                      deviceInfo: {"name":"iPhone 6","target":"n                                                                                                                ative-ios","devicePixelRatio":2,"canRotate":true,"canResize":false,"height":1334                                                                                                                ,"width":7 …
                                            port: undefined
                                         modules: ["devkit-simulator-client","de                                                                                                                vkit-view-inspector"]
                                    spriteImages: true
                                              ip: 192.168.1.64
                                  localServerURL: 192.168.1.64:9200
                                      serverName: local
                              outputResourcePath: D:\devkit\projects\helloworld\                                                                                                                build\debug\simulator
                                          studio: studio.example.com
                                         version: debug
                                        compress: false
                                           appID: a575e6fcc6e0458487a7be78a035f5                                                                                                                a9
                                  cacheDirectory: D:\devkit\projects\helloworld\                                                                                                                build\debug\simulator\devkit-cache
                                     cachePrefix: debug-native-ios-sim
                                powerOfTwoSheets: false
                              removeUnusedSheets: false
                                  compressImages: false
                                      studioName: com.example.studio
                                        bundleID: com.example.studio.helloworld
                                     packageName: com.example.studio.helloworld
                                      titles:
                                              en: helloworld
                                           title: helloworld
                                           isIOS: true
                                          repack: undefined
                                            open: true
                                          reveal: undefined
                                   provisionPath: undefined
                                 signingIdentity: undefined
                                   enableLogging: false
                                     browser:
                                     embedSplash: false
                                      embedFonts: false
                                  appleTouchIcon: false
                          appleTouchStartupImage: false
                                           frame: {}
                                          canvas: {}
                                            copy: []
                                        headHTML: []
                                        bodyHTML: []
                                      footerHTML: []
                             hasApplicationCache: false
                               hasWebAppManifest: true
                                  webAppManifest: {"name":"helloworld","icons":[                                                                                                                ],"start_url":"index.html","display":"standalone"}
                                         baseURL:
                                 directories:
                                               0: {"src":"D:\\devkit\\projects\\                                                                                                                helloworld\\resources","target":"resources"}
                     --- end config ---
    [jsio-compile]  compiling import devkit.browser.launchClient, devkit-simulat                                                                                                                or-client, devkit-view-inspector
                    jsio_compile "import devkit.browser.launchClient, devkit-sim                                                                                                                ulator-client, devkit-view-inspector, util.syntax" --cwd "D:\\devkit\\projects\\                                                                                                                helloworld" --environment "browser" --path "[\"D:\\\\devkit\\\\projects\\\\hello                                                                                                                world\\\\modules\\\\devkit-core\\\\node_modules\\\\jsio\\\\packages\",\".\",\"li                                                                                                                b\",\"modules\\\\devkit-core\\\\src\\\\clientapi\\\\api\",\"modules\\\\devkit-co                                                                                                                re\\\\modules\\\\timestep\\\\src\"]" --includeJsio "true" --appendImport "false"                                                                                                                 --debug "4" --pathCache "{\"devkit-simulator-client\":\"C:\\\\Users\\\\melod\\\                                                                                                                \AppData\\\\Roaming\\\\npm\\\\node_modules\\\\devkit\\\\modules\\\\devkit-simula                                                                                                                tor-client\\\\client\",\"devkit-view-inspector\":\"C:\\\\Users\\\\melod\\\\AppDa                                                                                                                ta\\\\Roaming\\\\npm\\\\node_modules\\\\devkit\\\\modules\\\\devkit-view-inspect                                                                                                                or\\\\simulator\",\"devkit\":\"modules\\\\devkit-core\\\\src\\\\clientapi\",\"sq                                                                                                                uill\":\"modules\\\\devkit-core\\\\modules\\\\squill\"}" --compressorCachePath "                                                                                                                D:\\devkit\\projects\\helloworld\\build\\debug\\simulator\\devkit-cache\\debug-n                                                                                                                ative-ios-simjs" --defines "{\"BUILD_TARGET\":\"native-ios\",\"BUILD_ENV\":\"nat                                                                                                                ive\",\"DEBUG\":true}" --printOutput  --gcManifest "D:\\devkit\\projects\\hellow                                                                                                                orld\\manifest.json" --gcDebug "true" --preprocessors "[\"cls\",\"logger\"]"
LOG .__imports__ Including browser runtime.
      [native-ios]  resource-source-map complete
                    spriter complete
                    fonts complete
                    html complete
                    app-js complete
    [static-files]  creating cache-worker.js
                    creating web-app-manifest.json
      [native-ios]  static-files complete
                    write-files complete
           [build]  build succeeded
                    6.39 seconds elapsed

this is the screen shoot

image

Console log:

image

@MikaelDev
Copy link

Were you able to solve this? I had the exact same issue..

@jasir
Copy link

jasir commented Feb 11, 2016

The same. Is this project alive? I am just trying it, 2 hours and no success... (windows :( )

@synaestheory
Copy link

As a temporary work-around, you can edit the modules/devkit-core/src/aclientapi/index.js file lines 129 and 138 to empty objects.
var spritesheets = {}
and
var soundMap = {};

This does NOT fix the JSON.parse error and is definitely not intended to be a complete solution to the issue. If the you're expecting your spritesheets map or sound map to load, this will not resolve the issue. I'm trying to dig through the source code right now to see if there's a way to properly resolve the issue.

@synaestheory
Copy link

After further investigation, this appears to be an issue with the variable assignment of GLOBAL.CACHE on windows. The built code is looking for GLOBAL.CACHE['spritesheets/map.json'] but the cache member as it is assigned is GLOBAL.CACHE['spritesheets\map.json'].

I'm still trying to track down where and how the cache gets set. I am hoping to fully track down this issue and get this squared away with a PR asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants