Skip to content
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

Cordova build shows blank page #236

Closed
obonyojimmy opened this issue Dec 3, 2016 · 3 comments
Closed

Cordova build shows blank page #236

obonyojimmy opened this issue Dec 3, 2016 · 3 comments

Comments

@obonyojimmy
Copy link

Hi , have being strugling with this issue past 2 days :

Steps
1.App runs ok on dev with no errors npm run dev
2.App is built succesfully with cordova no issues or errors or anything here
3.Generated Apk shows blank page

Code
Am using vue-router with beforeEnter hook which basically checks if a token is set on the session , if not redirects to login module , check sample below :

export default new VueRouter({
  routes: [
    {
        path: '/',
        component: load('index'),
        beforeEnter: guardRoute
    },
  {
        path: '/home',
        component: load('home'),
        beforeEnter: guardRoute
    },
   {
        path: '/login',
        component: load('login')
    },
 ]
}) 

function guardRoute (to, from, next) {
  console.log(SessionStorage.has('token'))
  if (!SessionStorage.has('token')) {
    console.log('not loged')
    next({
      path: '/login',
      query: { redirect: to.fullPath }
    })
  }
}

Any ideas , to solve this ?

@laurentpayot
Copy link
Contributor

laurentpayot commented Dec 3, 2016

Did you try the console in Chrome remote debugging tools ? http://quasar-framework.org/guide/cordova-wrapper.html#Remote-Debugging

@rstoenescu
Copy link
Member

Hi.

There must be an issue with your App. This is more of a question for your own app, so the forum would be a better place to get help. So please do open a thread in forum (http://forum.quasar-framework.org/).

Investigate with Chrome Remote Debugging (@laurentpayot gave you a good link above).

Thanks.

@obonyojimmy
Copy link
Author

Seems like one of my routes was not configured correctly , fixing the route issue solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants