Financier Forums

Financier App => Bug Reports => Topic started by: Bruce on November 23, 2016, 11:14:57 AM

Title: Unable to login on iPhone
Post by: Bruce on November 23, 2016, 11:14:57 AM
I hesitate to call this a bug since I know the mobile app is under development and it could be user error.

I just tried for the first time in a couple of weeks to login using Safari on my iPhone. At first it would show me logged in and synced, but all I could see was the "Add Budget" box, not my budget box. The sync process was also very short. I logged out, cleared my history and data in settings then tried again. This time the sync process was taking a little longer (more like I expected), but then I got a pop up box asking if I wanted to allow Financier to use up to 5MB of storage on my phone. I clicked "increase", it started doing the sync spin again, then I got the pop up increase to 5MB box again. This probably went on for 5 times until I gave up.

At his point I can't login via Safari on my iPhone.
Title: Re: Unable to login on iPhone
Post by: MacMichael on November 23, 2016, 12:34:09 PM
I get the same thing -- increase database size -- over and over.  Even pressing "cancel" doesn't stop it.
Title: Re: Unable to login on iPhone
Post by: Alex on November 23, 2016, 01:29:47 PM
Yeah, safari does all sorts of weird stuff. :( I'll look into it, but consider it unsupported/broken until I get mobile support released. thx!
Title: Re: Unable to login on iPhone
Post by: Alex on November 23, 2016, 11:11:18 PM
@Bruce @MacMichael I may have come to the bottom of this issue. Let me know if it's still a problem when this is deployed:

https://trello.com/c/PSP2XjV8/276-safari-request-websql-space-loop
Title: Re: Unable to login on iPhone
Post by: Bruce on November 24, 2016, 12:45:15 AM
Will do. Thanks.
Title: Re: Unable to login on iPhone
Post by: MacMichael on November 24, 2016, 07:35:10 AM
@Alex:  Thanks for investigating.  I also had the same problem using Firefox iPhone app.
Title: Re: Unable to login on iPhone
Post by: Bruce on November 26, 2016, 02:25:52 PM
@Alex I was able to login. Thanks!
Title: Re: Unable to login on iPhone
Post by: Alex on November 26, 2016, 02:30:09 PM
Quote from: MacMichael on November 24, 2016, 07:35:10 AM
@Alex:  Thanks for investigating.  I also had the same problem using Firefox iPhone app.

If you're on the iPhone, that's understandable since Firefox on iOS uses Safari under the hood -- it's just skinned differently (1) (https://en.wikipedia.org/wiki/Firefox_for_iOS#cite_note-10).

Quote from: Bruce on November 26, 2016, 02:25:52 PM
@Alex I was able to login. Thanks!

Good to hear!
Title: Re: Unable to login on iPhone
Post by: Paul on November 26, 2016, 04:32:40 PM
It's been two days since I was able to sync properly from my iPad. I have cleared all website history and the PouchDB file.

In Safari there is a constant loop between syncing and sync complete - with the budget never fully loading.
In Chrome the logged in page syncs but says "sync complete" before my budget is "mounted"
All was fine in the previous two weeks.

Similar issues on iPhone.
Anyone else also suffering?
My desktop still seems ok.
:-\
Title: Re: Unable to login on iPhone
Post by: Alex on November 26, 2016, 04:56:50 PM
Safari has issues if you logged out + cleared local budgets and then try logging back in. (There's a bug in the browser.) However, completely clearing website data + restarting the browser seems to fix it for me. You may also have to remove from the home screen if you did that.

Note that Chrome on iOS (also Firefox) is just Safari with a skin, so they'll all have the same problems on i-devices.

I've spent hours on this problem and it's really unfortunate that Apple has let Safari suffer from all of these bugs. Safari is really a poor browser (at least from a developer perspective) nowadays.
Title: Re: Unable to login on iPhone
Post by: Bruce on November 26, 2016, 05:11:27 PM
So I guess the ultimate question is will we have a viable mobile iOS option?
Title: Re: Unable to login on iPhone
Post by: Alex on November 26, 2016, 05:13:50 PM
As long as you don't log out + clear local budgets on your mobile apple device, it'll never be an issue. :)

Although I'll keep digging for the root cause. There will be a workaround I'll find eventually.

For now if you do log out + clear local budgets on an apple device, you got to clear all browser data in the settings...
Title: Re: Unable to login on iPhone
Post by: Alex on November 26, 2016, 05:30:18 PM
See this issue where I've been investigating: https://github.com/pouchdb/pouchdb/issues/5943
Title: Re: Unable to login on iPhone
Post by: Paul on November 27, 2016, 05:16:42 AM
Thanks Alex - it was helpful to understand that all these IOS browsers are basically just skins of Safari - based on WebKit I presume.

Thanks for continuing to work on the issue

By way of an experiment:

1) I cleared all website data and history on my ipad - and switched off iCloud and Chrome syncing.
2) I loaded up Opera Coast and managed to get my budget synced to it - although even after playing with the browser localisation settings it persists with the mm/dd/yyyy date format instead of dd/mm/yyyy. PS: Opera Coast worked on my iPad but not on my iPhone for some reason
3) I then tried with Safari - it asked me to allow 50 mb space - but is now in permanent sync, never loading my budget.
4) I then tried with Chrome - it just loops "syncing", "sync complete", "syncing" and so on.

So my experience is a bit more extreme than yours. Even after logging out, clearing local data, clearing all website and data, deleting apps and removing syncing I still have the same issue in iOS.
Update:
Have now got things working on both my iPad and iPhone again BUT REMEMBER to switch off iCloud sync of Safari data first.
This maybe unconnected but all my dates have just reverted to mm/dd/yyyy instead of my localised dd/mm/yyy. Date format remains fine in all other web apps
Title: FIXED Re: Unable to login on iPhone
Post by: Paul on November 28, 2016, 10:37:01 AM
With Alex's kind help and a bit of mucking around here is the fix. Tested on both iphone and ipad:
- Log out of the iCloud Safari sync on your iOS device
- Remove any pinned copies of Financier
- Go to Settings/Safari/Clear All Website Data
- To be sure of the job then go to Safari/Advanced and do the same there
- Restart your device
- Restart iCloud Safari sync
- Log back into to your Financier budget and wait for it to sync
- Be sure never to log out of Financier again or clear local budgets!

Hope it works for you... ::)

Title: Re: Unable to login on iPhone
Post by: Alex on December 09, 2016, 12:40:46 PM
Just to follow up, if you do the above, clearing local budgets should no longer be a problem with the latest version. Thx @Paul
Title: Re: Unable to login on iPhone
Post by: Bruce on December 09, 2016, 12:52:33 PM
Quote from: Alex on December 09, 2016, 12:40:46 PM
Just to follow up, if you do the above, clearing local budgets should no longer be a problem with the latest version. Thx @Paul

Yep I've been able to login and out with no problem.
Title: Re: Unable to login on iPhone
Post by: MacMichael on December 09, 2016, 01:52:00 PM
Does iCloud Sync for Safari have anything to do with Financier syncing?  I don't use iCloud Sync for Safari (it is turned off).  When I login, Financier loops between Syncing and Sync Complete.  I have cleared all the web data and shut off/on my iPad several times with no luck.
Title: Re: Unable to login on iPhone
Post by: Paul on December 09, 2016, 05:44:55 PM
Quote from: MacMichael on December 09, 2016, 01:52:00 PM
Does iCloud Sync for Safari have anything to do with Financier syncing?  I don't use iCloud Sync for Safari (it is turned off).  When I login, Financier loops between Syncing and Sync Complete.  I have cleared all the web data and shut off/on my iPad several times with no luck.
The only reason I turned off iCloud syncing of Safari data was just in case tha Financier data was resynced between devices (I'm not sure that it is - it was just an extra precaution.
Otherwise carefully following the steps I outlined above - and specifically the Financier store - resolved my identical IOS problem. I must admit though I had to be very meticulous checking and rechecking that the Safari web store was cleared (Inc in advanced settings) before I succeeded
Title: Re: Unable to login on iPhone
Post by: MacMichael on December 09, 2016, 06:22:07 PM
@Paul  I finally gave up trying.  But after about 3 hours, I tried syncing one more time -- it magically worked.  Maybe my iPad needed a rest?????  Anyway, thanks for the encouragement and thanks for posting your syncing method.  Also, of course, we all need to thank @Alex.
Title: Re: Unable to login on iPhone
Post by: Alex on December 09, 2016, 06:22:47 PM
iOS is weird :P Glad it's working for you now.
Title: Re: Syncing data is incorrect on iPad
Post by: michaelmjd on December 16, 2016, 03:18:05 PM
Well, I went through all of the steps outlined by Paul (and Alex) and it still is not working for me on my iPad in Safari. It syncs but not to the latest data. It's weird though because it seems to have randomly picked 4 different transactions (one of them from today) and only lists those instead of all of them (nearly 30 or so on my desktop).

Maybe I just need to "give it a rest" like someone else did...
Title: RE: Syncing data is incorrect on iPad
Post by: michaelmjd on December 16, 2016, 03:55:43 PM
UPDATE:

So I tried logging in from my iphone and after it syncs, it's showing the same data as my iPad...just the 4 transactions. I'm beginning to wonder if my desktop version (with 30+ entries) is not actually syncing/backing up and I'm only seeing what's saved in the browser? I hope that's not the case because I would hate to lose all of those entries.

Does anyone know of a way to check if I'm accessing sync'd info in my browser or if it's coming from what's already saved on my machine?
Title: Re: RE: Syncing data is incorrect on iPad
Post by: Bruce on December 16, 2016, 04:21:18 PM
Quote from: michaelmjd on December 16, 2016, 03:55:43 PM
UPDATE:

So I tried logging in from my iphone and after it syncs, it's showing the same data as my iPad...just the 4 transactions. I'm beginning to wonder if my desktop version (with 30+ entries) is not actually syncing/backing up and I'm only seeing what's saved in the browser? I hope that's not the case because I would hate to lose all of those entries.

Does anyone know of a way to check if I'm accessing sync'd info in my browser or if it's coming from what's already saved on my machine?

Do you see the "Sync Complete" message in the lower left corner; just below the "Add an Account" button? That's the only way I know how to tell.
Title: Re: Unable to login on iPhone
Post by: michaelmjd on December 16, 2016, 05:29:03 PM
Update 2:

So it seems that this was not an iOS/Safari issue after all.

I decided to see if my desktop's numbers were actually coming from the sync'd data. So I downloaded a json backup and then logged out, cleared browser data and logged back in....and it sync'd with the same info as my iPad and iPhone were showing: just 4 transactions.

So, although it said Sync Complete the entire time on my desktop, it apparently was not really getting backed up.

Anyway, I restored from my backup and all is the same now. I still need to check if changes to the desktop version will sync with the other devices but I have no reason to think they won't.

Hopefully this was just a weird one-time wrinkle.
Title: Re: Unable to login on iPhone
Post by: Alex on December 16, 2016, 06:14:41 PM
Where you using safari on the desktop?
Title: Re: Unable to login on iPhone
Post by: michaelmjd on December 16, 2016, 07:55:09 PM
No, Chrome.
Title: Re: Unable to login on iPhone
Post by: Alex on December 16, 2016, 07:59:17 PM
So, a couple things. It looks like you didn't have an active financier subscription from the 10th through the 16th (today). However, after you started your subscription, it should have started syncing again.

Did you try refreshing the page to resume the sync after paying?

I'll look into this some more. :) Thanks for pointing it out! At least I have a place to start doing debugging.
Title: Re: Unable to login on iPhone
Post by: Alex on December 17, 2016, 01:15:52 AM
Welp, I'm on vacation so this is a bad time, but I've narrowed down the problem. Will provide an explanation post within next few days and a fix ASAP.

@michaelmjd You did the right thing and you should never encounter this issue again. :) But other users may (specifically: those that signed up for financier, let their subscription lapse, modified their budget and then subscribed).