Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

SQLITE_CANTOPEN on startup/auth #654

Closed
ian29 opened this issue Aug 13, 2014 · 31 comments
Closed

SQLITE_CANTOPEN on startup/auth #654

ian29 opened this issue Aug 13, 2014 · 31 comments
Labels

Comments

@ian29
Copy link
Contributor

ian29 commented Aug 13, 2014

From a user running windows build fcaf7c2

I’m running into an issue where I can navigate past the Authorize Your Account page.

If I chose “Allow” and then “Skip Intro” I get this error:

image

If I chose “Deny” than I get this error:

image

Clicking on the “X” just navigates me back to the Login page.
I’ve tried revoking the MBS access token in my account settings and having MBS add in the token, but that’s not working either.

@tjperry07
Copy link

Same issue on Windows

@yhahn yhahn added windows and removed windows labels Aug 22, 2014
@KcKal
Copy link

KcKal commented Sep 1, 2014

Ditto on this problem. Windows 8.

@yhahn
Copy link
Member

yhahn commented Sep 1, 2014

@KcKal any chance you could gist your logs like you did here? #737 (comment)

Thanks in advance.

@KcKal
Copy link

KcKal commented Sep 1, 2014

Easy. Unfortunately though, not a whole lot of info in the log file:

https://gist.github.com/KcKal/7bc399075daa59028ca5

@yhahn
Copy link
Member

yhahn commented Sep 1, 2014

Hrm, looking into this and seeing a few possible culprits (http://sqlite.1065341.n5.nabble.com/Random-error-SQLITE-CANTOPEN-on-Windows-XP-SP2-with-sqlite3-exec-td10529.html), in particular:

  • TortoiseSVN
  • Antivirus scanners

If you're running anything like this that might be scanning/reading these files it would be great to know if the issue occurs when they are disabled -- not as a long term solution but to confirm the source of the problem.

@KcKal
Copy link

KcKal commented Sep 1, 2014

Don't have TortoiseSVN, and only have the lameass "Windows Defender" that comes with Windows 8. Turned that badboy off as well, to no avail.

@yhahn
Copy link
Member

yhahn commented Sep 1, 2014

Nice : ) thx for the datapoints -- will keep digging.

@KcKal
Copy link

KcKal commented Sep 1, 2014

No worries. Got a new product/project launch for which studio would be rather perfect so I'm pretty keen to get into it. :)

@yanaybrook
Copy link

Got the same issue. Windows 8

@wilhelmberg
Copy link
Contributor

Windows 8:
I just get Access denied error.

app.log:

Mapbox Studio @ http://localhost:3000/
Error: Access denied
    at Object.app.use.passport.authenticate.session [as handle] (c:\Program Files (x86)\mapbox-studio\resources\app\lib\oauth.js:62:14)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:190:15)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:165:78)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:165:78)
    at Object.initialize [as handle] (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\passport\lib\middleware\initialize.js:62:5)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:190:15)
    at Object.expressInit [as handle] (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\lib\middleware.js:31:5)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:190:15)
    at Object.query [as handle] (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\middleware\query.js:44:5)
    at next (c:\Program Files (x86)\mapbox-studio\resources\app\node_modules\express\node_modules\connect\lib\proto.js:190:15)

@wilhelmberg
Copy link
Contributor

W8: If I start MapBox Studio as Administrator it works.

@wilhelmberg
Copy link
Contributor

2nd run as normal user is successful.

@wilhelmberg
Copy link
Contributor

W7: No problems.

Interesting thing:
I deleted c:\Program Files (x86)\mapbox-studio and ~/.mapbox-studio before installing 0.0.6 and it still knows my user name.

@springmeyer
Copy link
Contributor

noting that there was this bug in node-sqlite3 but as far as I can see neither mbstudio or node-mbtiles is using sqlite3.cached.Database().

@springmeyer
Copy link
Contributor

good description, if old, of one cause of this problem: http://svn.haxx.se/dev/archive-2003-10/0136.shtml

@pmwalker1990
Copy link

First time trying to open Mapbox Studio, got this error. Haven't successfully opened the software at all, unfortunately.

@wilhelmberg
Copy link
Contributor

@pmwalker1990
Have you tried starting it as Admin?
Right click -> Run as Adminstrator
For then on I could run it normally.

@wilhelmberg
Copy link
Contributor

Update from my side:
In the meantime I've tried it with vanilla installs (all 64bit) of

  • W8
  • W8 SP1
  • W8.1

No errors.

@pmwalker1990
Copy link

Just did a fresh install and tried opening as admin, still getting the same error. Unfortunately, I'm new to the community, so I'm still learning how everything works. In other words, I don't have much to offer in terms of troubleshooting the problem.

@KcKal
Copy link

KcKal commented Sep 4, 2014

I tried that, but didn't work for me. W8.1

On Thu, Sep 4, 2014 at 4:16 AM, Wilhelm Berg notifications@github.com
wrote:

@pmwalker1990 https://github.com/pmwalker1990
Have you tried starting it as Admin?
Right click -> Run as Adminstrator
For then on I could run it normally.


Reply to this email directly or view it on GitHub
#654 (comment)
.

@yhahn yhahn mentioned this issue Sep 4, 2014
@MarkWS
Copy link

MarkWS commented Sep 4, 2014

Update:
Myself and Ian (at MapBox) started this thread.
I spent about two hours yesterday trying to figure out why MapBox Studio (MBS) is not referencing the SQLite DB that is loaded with the software.

Our findings:
• We tweaked the mbtiles.js and the node.js file constructor. In the node.js we modified line 54 and 55 if 'err return path' instead of 'err object' which is as most of you know is 'SQLITE_CANTOPEN'
• That returned the actual path or file that SQLite is looking for.
• It seems it’s looking for a DB file in the cache folder; \Users\user-name.mapbox-studio\cache which does not exits; very-long-file-name.mbtiles
• We created a blank file, placed that in the folder but still nothing
Today we will create a blank SQLite DB file, rename it to the file name MBS is looking for, and try again.

Updating the permissions in the cache folder; \Users\user-name.mapbox-studio\cache returned no positive results

Win 7 Pro 64bit

@yhahn
Copy link
Member

yhahn commented Sep 4, 2014

@MarkWS thanks for your detailed notes -- we've been looking into this over the past few days and your report is giving me some ideas for more things to try. Will keep you posted.

@yhahn
Copy link
Member

yhahn commented Sep 4, 2014

@MarkWS we're looking at this now and it's def not fixed in 0.0.7. At least one possible cause of this is having a username folder with a space or other non alphanumeric characters in it. I think we'll have a fix for this shortly but if you want to test this hypothesis (by using a username without a space character) it would be very helpful.

@MarkWS
Copy link

MarkWS commented Sep 4, 2014

Yes, still not working with v0.7 and this is the error:

capture

I see the path is now being displayed, which is nice. At least we know where the problem is occurring.

@yhahn
Copy link
Member

yhahn commented Sep 4, 2014

@MarkWS great, will have a v0.0.8 for you to test later today.

@yhahn yhahn mentioned this issue Sep 4, 2014
@yhahn
Copy link
Member

yhahn commented Sep 4, 2014

@MarkWS and others -- there's a new v0.0.8 release for windows available here:

https://www.mapbox.com/mapbox-studio/#win32

It has an important fix that may address this issue in some cases and have better error messages that will help us track down remaining issues if not. Let me know how it goes for you!

@MarkWS
Copy link

MarkWS commented Sep 5, 2014

v0.0.8 seems to have solved this problem.
I can now start MBS!
Thanks Young!

@yhahn
Copy link
Member

yhahn commented Sep 5, 2014

@KcKal @pmwalker1990 @tjperry07 @yanaybrook would be great if you could try the new release out and confirm (or deny) the fix.

@pmwalker1990
Copy link

Everything is working now! Thank you so much! Can't wait to start using it.

@yanaybrook
Copy link

Its working also for me... seems to solve the problem.
Thanks a lot for your help... Will create some awesome maps now :)

@yhahn
Copy link
Member

yhahn commented Sep 7, 2014

Great, closing.

@yhahn yhahn closed this as completed Sep 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants