fuse-open / fuse-samples

A collection of smaller examples using the various features of Fuse and FuseJS
MIT License
182 stars 153 forks source link

FuseJS/Storage does not work in Android Export #80

Open Paulofsr opened 5 years ago

Paulofsr commented 5 years ago

Hi!

When I export the Storage Example to my Android show this log and the app not open..

Running logcat on 'ce091719e962962102'

02-10 17:33:40.800 5183 8098 I ActivityManager: Start proc 19346:com.apps.storageexample/u0a307 for activity com.apps.storageexample/.StorageExample 02-10 17:33:40.801 19346 19346 E Zygote : isWhitelistProcess - Process is Whitelisted 02-10 17:33:40.802 19346 19346 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-G950F_8.0.0_0018, [-1 -1 -1 -1 0 1] 02-10 17:33:40.803 19346 19346 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.apps.storageexample 02-10 17:33:40.808 19346 19346 I zygote : Late-enabling -Xcheck:jni 02-10 17:33:40.903 19346 19346 D ActivityThread: Added TimaKeyStore provider 02-10 17:33:40.944 9191 9241 I SAMSUNGPAY: [Hint_ProcessStatusChange] fg Change, pid : 19346 , isNotify : true , isForeground : true , fg list : [19346, 6759] 02-10 17:33:40.946 6137 12642 D ProcessObserver_FLP: onForegroundActivities changed, 19346/10307/true 02-10 17:33:41.053 19346 19387 I vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/egl/libGLES_mali.so from the current namespace instead. 02-10 17:33:41.077 19346 19387 D libEGL : loaded /vendor/lib/egl/libGLES_mali.so 02-10 17:33:41.097 19346 19346 D StorageExample: SDK: 26 02-10 17:33:41.114 19346 19357 I zygote : Do partial code cache collection, code=30KB, data=24KB 02-10 17:33:41.114 19346 19357 I zygote : After code cache collection, code=30KB, data=24KB 02-10 17:33:41.114 19346 19357 I zygote : Increasing code cache capacity to 128KB 02-10 17:33:41.173 19346 19346 V Surface : sf_framedrop debug : 0x4f4c, game : false, logging : 0 02-10 17:33:41.174 19346 19346 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format , EGLBoolean) returns 0x3000, [1x1]-format:1 02-10 17:33:41.404 19346 19357 I zygote : Do partial code cache collection, code=62KB, data=41KB 02-10 17:33:41.405 19346 19357 I zygote : After code cache collection, code=62KB, data=41KB 02-10 17:33:41.405 19346 19357 I zygote : Increasing code cache capacity to 256KB 02-10 17:33:41.470 19346 19444 D OpenGLRenderer: HWUI GL Pipeline 02-10 17:33:41.481 19346 19346 D ViewRootImpl@e77a1e4[StorageExample]: setView = DecorView@69b964d[StorageExample] TM=true MM=false 02-10 17:33:41.523 19346 19346 V InputMethodManager: Not IME target window, ignoring 02-10 17:33:41.526 19346 19346 D ViewRootImpl@e77a1e4[StorageExample]: dispatchAttachedToWindow 02-10 17:33:41.545 5183 7941 D InputDispatcher: Focus entered window: 19346 02-10 17:33:41.548 19346 19346 V Surface : sf_framedrop debug : 0x4f4c, game : false, logging : 0 02-10 17:33:41.551 19346 19346 D ViewRootImpl@e77a1e4[StorageExample]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,2220] result=0x7 surface={valid=true 3345997824} changed=true 02-10 17:33:41.552 19346 19444 I OpenGLRenderer: Initialized EGL, version 1.4 02-10 17:33:41.552 19346 19444 D OpenGLRenderer: Swap behavior 2 02-10 17:33:41.556 19346 19444 D libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : com.apps.storageexample 02-10 17:33:41.578 19346 19444 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void *, EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000, [1080x2220]-format:1 02-10 17:33:41.578 19346 19444 D OpenGLRenderer: eglCreateWindowSurface = 0xc75f4ba8 02-10 17:33:41.591 19346 19434 D StorageExample: Js initialized 02-10 17:33:41.623 19346 19346 D SurfaceView: BG show() Surface(name=Background for - SurfaceView - com.apps.storageexample/com.apps.storageexample.StorageExample@c291580@0) android.view.SurfaceView{c291580 V.E...... ......ID 0,0-1080,2220} 02-10 17:33:41.639 19346 19346 V Surface : sf_framedrop debug : 0x4f4c, game : false, logging : 0 02-10 17:33:41.639 19346 19346 D SurfaceView: surfaceCreated 1 android.view.SurfaceView{c291580 V.E...... ......ID 0,0-1080,2220} 02-10 17:33:41.643 19346 19346 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x2220]-format:1 02-10 17:33:41.644 19346 19346 D SurfaceView: surfaceChanged (1080,2220) 1 android.view.SurfaceView{c291580 V.E...... ......ID 0,0-1080,2220} 02-10 17:33:41.671 19346 19460 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7 in tid 19460 (Thread-3) 02-10 17:33:41.765 5079 5079 I /system/bin/tombstoned: received crash request for pid 19346 02-10 17:33:41.768 19478 19478 I crash_dump32: performing dump of process 19346 (target tid = 19460) 02-10 17:33:41.770 19478 19478 F DEBUG : pid: 19346, tid: 19460, name: Thread-3 >>> com.apps.storageexample <<<

02-10 17:33:42.878 5183 19572 D InputDispatcher: Focus left window: 19346 02-10 17:33:42.892 3248 3248 E lowmemorykiller: Error writing /proc/19346/oom_score_adj; errno=22

02-10 17:33:42.933 5043 5043 I Zygote : Process 19346 exited due to signal (11) 02-10 17:33:42.937 5183 5196 I ActivityManager: Process com.apps.storageexample (pid 19346) has died: vis +99TOP (74,909)

02-10 17:33:42.963 9191 9241 I SAMSUNGPAY: [Hint_ProcessStatusChange] invoke foreground activities changed - onProcessDied pid:19346 uid : 10307 02-10 17:33:42.974 5183 5256 W ActivityManager: setHasOverlayUi called on unknown pid: 19346 02-10 17:33:42.978 6137 12642 D ProcessObserver_FLP: onProcessDied, 19346/10307

Process com.apps.storageexample terminated.

isrightkev commented 4 years ago

Storage.read is broken in android this is how i fixed it

function readSyncFix(){
    try {
        var data = JSON.parse(Storage.readSync(savefile));
        welcomeText.value = "Hi "  + data.welcomeText;
    } catch (e) {
        debug_log("error no file")
    }
};
readSyncFix()