Common Issues

#1 First time build the app and get error with Home Screen

When you use the source code and setup the URL with your domain name and then use the app connect with it. The error may happen like the image above because you didn’t add any data from the backend or just add a few data, not totally enough data.  So please refer to this URL https://passionui.com/docs/listar-pro/mobile-content/dashboard for how to add the data for Mobile Dashboard. There have 4 sections

  • Slider
  • Categories
  • Popular Locations
  • Recent Locations

#2 The app was built successfully, these features are related with authorization don’t work properly

Listar Pro – Error with functions are related with authorization

The application works properly, but these functions are not work properly

  • Can’t save directory listing to the wishlist
  • Can’t write the comment
  • Can’t sign in

These common issues are related with WordPress authentication. Most servers have disabled the HTTP Authorization Header by default. So the server can’t decode the Bearer Token from the app although the user has authorized and sent the correct token. 

For fix that, please make sure that you had done follow this instruction Listar Pro > Installation (https://passionui.com/docs/listar-pro/installation)

If you have followed the instruction Listar Pro > Installation but your app can’t work properly. You can follow this trick. Steps

From your the source code WordPress site, open file
wp-content/plugins/jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php

At the line number 250, please add more the code below

if (!$token) {
    // Get token using basic auth
    list($username, $password) = explode( ':', base64_decode( substr( $auth, 6 ) ) );
    $request = new WP_REST_Request( 'POST', '/wp-json/jwt-auth/v1/token' );
    $request->set_param( 'username', $username );
    $request->set_param( 'password', $password );
    $JWT = new Jwt_Auth_Public('jwt-auth', '1.1.0');
    $token = $JWT->generate_token( $request );
    if (is_array($token) && isset($token['token'])) $token = $token['token'];
    return;
 }

After you modified, the result will be liked 

Then try your app again. Good luck !