Common Issues

#1 Can’t upload image via the app

The default setting of your server may limit the size of upload files. So you need check again your server setting

PHP (/etc/php.ini)

  • upload_max_filesize: 12MB
  • post_max_size: 12MB

Restart the PHP service

systemctl restart php-fpm.service

Nginx (/etc/nginx/conf.d/domain.conf)

File domain.conf can be different name with your setting. It could be your_server.conf, your_domain.conf …

The default setting max size upload of nginx server is 1MB. When you need upload larger file, please add the setting below to your *.conf file

  • client_max_body_size 24M;

Restart nginx service

nginx -s reload

#2 The app was built successfully but can’t authorize

Listar FluxPro – 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. 

Please follow this document  Listar FluxPro > Installation (https://passionui.com/docs/listar-fluxpro/installation)

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 !