emansih / FireflyMobile

Mobile Application for Firefly III written in Kotlin
GNU General Public License v3.0
323 stars 48 forks source link

Crash when signing in with a personal access token #74

Open ghost opened 4 years ago

ghost commented 4 years ago

Firefly III Server Version: 4.8.2 (stable)

Firefly III Mobile Version: 1.4.6

Android Version: 9 (LineageOS)

Device Information:


Expected Behavior

Sign in

Current Behavior

Crash

Steps to Reproduce

Launch application Select "PERSONAL ACCESS TOKEN" entry from "Sign in using..." menu Enter URL (https://192.168.1.240/firefly) Enter personal access token Press "SIGN IN"

Fireflyiii-mobile.txt

emansih commented 4 years ago

What happens if you use oauth?

ChrisCarini commented 4 years ago

I get the same stacktrace:

REPORT_ID=6709f5b2-411e-44f8-82e3-28ac4fd98abf
APP_VERSION_NAME=1.4.6
PHONE_MODEL=Pixel 3 XL
BRAND=google
PRODUCT=crosshatch
ANDROID_VERSION=10
BUILD_CONFIG=

I'm using firefly 4.7.7 however.

@emansih , I also tried oAuth, and it seemed to just hang in my browser when I clicked approve (it appeared to just reload the page back to letting me click approve).

Suggestions? I'd really love to try the mobile app! It looks awesome!

Edited: does it matter if I have 2fa enabled? I can't imaging it would as the app uses tokens, but just a thought.

ChrisCarini commented 4 years ago

I just tried the app with the firefly-iii demo site (demo.firefly-iii.org) and it worked fine - the demo site is on version 5.0.0-alpha.1 as of writing.

emansih commented 4 years ago

Currently out of country, will look into it next week.

ghost commented 4 years ago

What happens if you use oauth?

Things go OK according to the instruction, but in the end when I get back to the app I get following error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

This should be so because I use self-signed certificate, I suppose.

emansih commented 4 years ago

https://github.com/emansih/FireflyMobile/issues/53#issuecomment-510961230

emansih commented 4 years ago

Android 9 doesn't trust self signed cert by default.

ChrisCarini commented 4 years ago

I was able to get this working by upgrading my firefly instance; both 4.8.0.3 and 4.8.2 were able to work fine w/ an access token.

GeorgeHahn commented 4 years ago

I'm getting the same stacktrace when connecting to my 4.8.2 instance over local http - oauth or PAT.

Android 9 disallows some cleartext traffic by default, could that be the issue? ref

emansih commented 4 years ago

@GeorgeHahn yes, pure HTTP is not supported and will never be.

emansih commented 4 years ago

@ChrisCarini so the android app works for you after you upgraded your Firefly III instance? Firefly III 4.7.7 is a really old version (Released on Sep 29, 2018). Many things have changed

micer commented 4 years ago

@emansih I have the same issue. OAuth doesn't work because of cleartext traffic is permitted and Personal Access Token is causing crash. I'm on HTTP, because I'm hosting firefly-iii instance on my local network and I don't think I need HTTPS.

emansih commented 4 years ago

@micer Personal Access Token is crashing for you on 1.4.8? Or are you on 1.4.7?

Anyway my stand is, I will not enable http protocol.

micer commented 4 years ago

@emansih I was on 1.4.7 (latest on F-Droid), 1.4.8 is not crashing anymore. I can understand the reasons why not to enable http in app, I'll see if I can setup HTTPS on my 7 years old Synology NAS. Thanks.

emansih commented 4 years ago

@micer yeah, I rewrote the entire Personal Access Token code for 1.4.8

ghost commented 4 years ago

@emansih, thank you, no crash with 1.4.8 for me, too.