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

Invalid Path? #77

Closed
Ryuinferno opened this Issue Jul 1, 2014 · 10 comments

Comments

Projects
None yet
8 participants
@Ryuinferno

Ryuinferno commented Jul 1, 2014

We have been integrating the SDK into our project, it works fine in most devices expect for this one (LG Optimus 4X HD).

This is the stack trace:

06-27 23:32:10.606 18561 18561 E PayPalService: Risk component failed to initialize, threw Invalid path: /storage/emulated/0
06-27 23:32:10.906 18561 18985 W dalvikvm: threadid=21: thread exiting with uncaught exception (group=0x4184cce0)
06-27 23:32:10.916 18561 18985 E AndroidRuntime: FATAL EXCEPTION: Thread-2264
06-27 23:32:10.916 18561 18985 E AndroidRuntime: Process: com.android.settings, PID: 18561
06-27 23:32:10.916 18561 18985 E AndroidRuntime: java.lang.IllegalArgumentException: Invalid path: /storage/emulated/0
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at android.os.StatFs.doStat(StatFs.java:46)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at android.os.StatFs.<init>(StatFs.java:39)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at com.paypal.android.sdk.bj.c(Unknown Source)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at com.paypal.android.sdk.aW.g(Unknown Source)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at com.paypal.android.sdk.aW.b(Unknown Source)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at com.paypal.android.sdk.aa.a(Unknown Source)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at com.paypal.android.sdk.H.run(Unknown Source)
06-27 23:32:10.916 18561 18985 E AndroidRuntime: Caused by: libcore.io.ErrnoException: statvfs failed: EACCES (Permission denied)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at libcore.io.Posix.statvfs(Native Method)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at libcore.io.ForwardingOs.statvfs(ForwardingOs.java:132)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    at android.os.StatFs.doStat(StatFs.java:44)
06-27 23:32:10.916 18561 18985 E AndroidRuntime:    ... 6 more

Thank you

@braebot

This comment has been minimized.

Show comment
Hide comment
@braebot

braebot Jul 1, 2014

Member

Thanks for the feedback. So we can better diagnose the issue, what version of the SDK are you using? Judging from the path, I assume you're using an emulator. Have you configured that correctly? An initial guess is that the SDK is probably writing something to the preferences, but the emulator is not happy.

Member

braebot commented Jul 1, 2014

Thanks for the feedback. So we can better diagnose the issue, what version of the SDK are you using? Judging from the path, I assume you're using an emulator. Have you configured that correctly? An initial guess is that the SDK is probably writing something to the preferences, but the emulator is not happy.

@Ryuinferno

This comment has been minimized.

Show comment
Hide comment
@Ryuinferno

Ryuinferno Jul 1, 2014

We are using the libraries in the master branch.
No, it's not an emulator, but it happened in the device.
http://stackoverflow.com/questions/20017468/differences-between-sdcard-emulated-0-and-sdcard

Multi user issues I guess? But phones do not have multi user support enabled, so only /storage/emulated/legacy is available

Ryuinferno commented Jul 1, 2014

We are using the libraries in the master branch.
No, it's not an emulator, but it happened in the device.
http://stackoverflow.com/questions/20017468/differences-between-sdcard-emulated-0-and-sdcard

Multi user issues I guess? But phones do not have multi user support enabled, so only /storage/emulated/legacy is available

@braebot

This comment has been minimized.

Show comment
Hide comment
@braebot

braebot Jul 2, 2014

Member

If you see the stack trace, you'll see there's a call from the PayPal SDK to StatFs. Perhaps we should be calling Environment.getExternalStorageDirectory() as the SO post suggests. Will need to do more digging.

Member

braebot commented Jul 2, 2014

If you see the stack trace, you'll see there's a call from the PayPal SDK to StatFs. Perhaps we should be calling Environment.getExternalStorageDirectory() as the SO post suggests. Will need to do more digging.

@nlubello

This comment has been minimized.

Show comment
Hide comment
@nlubello

nlubello Jul 14, 2014

Same problem with the PayPalAndroidSDK, just edited the CONFIG_ENVIRONMENT to test with sandbox and the CONFIG_CLIENT_ID to match my ID.
My LogCat on Samsung S3 with CM 11 android 4.4.4:

07-14 10:05:08.621: E/PayPalService(27333): Risk component failed to initialize, threw Invalid path: /storage/emulated/0
07-14 10:05:08.891: W/dalvikvm(27333): threadid=14: thread exiting with uncaught exception (group=0x41a13ce0)
07-14 10:05:08.891: E/AndroidRuntime(27333): FATAL EXCEPTION: Thread-2630
07-14 10:05:08.891: E/AndroidRuntime(27333): Process: com.paypal.example.paypalandroidsdkexample, PID: 27333
07-14 10:05:08.891: E/AndroidRuntime(27333): java.lang.IllegalArgumentException: Invalid path: /storage/emulated/0
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.doStat(StatFs.java:46)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.<init>(StatFs.java:39)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.bj.c(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aW.g(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aW.b(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aa.a(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.H.run(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333): Caused by: libcore.io.ErrnoException: statvfs failed: EACCES (Permission denied)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at libcore.io.Posix.statvfs(Native Method)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at libcore.io.ForwardingOs.statvfs(ForwardingOs.java:132)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.doStat(StatFs.java:44)
07-14 10:05:08.891: E/AndroidRuntime(27333):    ... 6 more

nlubello commented Jul 14, 2014

Same problem with the PayPalAndroidSDK, just edited the CONFIG_ENVIRONMENT to test with sandbox and the CONFIG_CLIENT_ID to match my ID.
My LogCat on Samsung S3 with CM 11 android 4.4.4:

07-14 10:05:08.621: E/PayPalService(27333): Risk component failed to initialize, threw Invalid path: /storage/emulated/0
07-14 10:05:08.891: W/dalvikvm(27333): threadid=14: thread exiting with uncaught exception (group=0x41a13ce0)
07-14 10:05:08.891: E/AndroidRuntime(27333): FATAL EXCEPTION: Thread-2630
07-14 10:05:08.891: E/AndroidRuntime(27333): Process: com.paypal.example.paypalandroidsdkexample, PID: 27333
07-14 10:05:08.891: E/AndroidRuntime(27333): java.lang.IllegalArgumentException: Invalid path: /storage/emulated/0
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.doStat(StatFs.java:46)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.<init>(StatFs.java:39)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.bj.c(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aW.g(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aW.b(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.aa.a(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at com.paypal.android.sdk.H.run(Unknown Source)
07-14 10:05:08.891: E/AndroidRuntime(27333): Caused by: libcore.io.ErrnoException: statvfs failed: EACCES (Permission denied)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at libcore.io.Posix.statvfs(Native Method)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at libcore.io.ForwardingOs.statvfs(ForwardingOs.java:132)
07-14 10:05:08.891: E/AndroidRuntime(27333):    at android.os.StatFs.doStat(StatFs.java:44)
07-14 10:05:08.891: E/AndroidRuntime(27333):    ... 6 more

@tomwhipple tomwhipple added the bug label Jul 28, 2014

@fechy

This comment has been minimized.

Show comment
Hide comment
@fechy

fechy Aug 20, 2014

I had the same issue.
Adding the permission to the manifest:
< uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" / >
Fixes the issue.

fechy commented Aug 20, 2014

I had the same issue.
Adding the permission to the manifest:
< uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" / >
Fixes the issue.

@braebot

This comment has been minimized.

Show comment
Hide comment
@braebot

braebot Aug 20, 2014

Member

Thanks @fechy. Obviously, we shouldn't require you to add that permission to your app. We're working on getting a fix out for this issue shortly.

Member

braebot commented Aug 20, 2014

Thanks @fechy. Obviously, we shouldn't require you to add that permission to your app. We're working on getting a fix out for this issue shortly.

@braebot

This comment has been minimized.

Show comment
Hide comment
@braebot

braebot Aug 22, 2014

Member

Fixed in 2.4.0.

Member

braebot commented Aug 22, 2014

Fixed in 2.4.0.

@braebot braebot closed this Aug 22, 2014

@Pavel87

This comment has been minimized.

Show comment
Hide comment
@Pavel87

Pavel87 Sep 27, 2016

What was the issue at the end?

Pavel87 commented Sep 27, 2016

What was the issue at the end?

@NinoDLC

This comment has been minimized.

Show comment
Hide comment
@NinoDLC

NinoDLC commented Oct 21, 2016

BUMP

@randstraw

This comment has been minimized.

Show comment
Hide comment
@randstraw

randstraw Nov 15, 2016

Member

I apologize I am unfamiliar with the cause of this issue; however, I assume if you are seeing an invalid path error now with an updated release the cause would be different since this issue is from 2014. If you are seeing issues for Invalid Path with the most recent release could you create a new issue?

Member

randstraw commented Nov 15, 2016

I apologize I am unfamiliar with the cause of this issue; however, I assume if you are seeing an invalid path error now with an updated release the cause would be different since this issue is from 2014. If you are seeing issues for Invalid Path with the most recent release could you create a new issue?

@paypal paypal locked and limited conversation to collaborators Nov 15, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.