Common Problems

HTTPS issue

By default, Jet Bridge will run in HTTP mode while Jet Admin opens in HTTPS. This can lead to a similar error when trying to connect to Jet Bridge running under HTTP:

Mixed Content: The page at 'https://app.jetadmin.io/builder/...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://JET_BRIDGE_HOST/api/discover/connection/'. This request has been blocked; the content must be served over HTTPS.

You have several options how to fix this issue:

  1. Run Jet Bridge in HTTPS mode using SSL_CERT and SSL_KEY options (see Configuration). You will need an SSL certificate and private key for the domain name under which Jet Bridge is running. If you don't have an SSL certificate you can create self-signed SSL certificate files .crt and .key (Manual).

  2. Run Jet Bridge behind a web server with HTTPS configured (for example nginx).

  3. (for Test purposes) You can use Jet Admin in HTTP mode. We allow you to open your App in HTTP mode if you change HTTPS to HTTP in your browser URL. Be sure to connect to Jet Bridge with http:// on your browser URL otherwise, you will get a connection error.

CORS issue

If you are deploying Jet Bridge behind a proxy or some webserver you can start receiving the following errors in your browser console:

Access to XMLHttpRequest at '...' from origin 'https://app.jetad.io.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Normally you shouldn't have this issue as Jet Bridge automatically adds the appropriate CORS headers to all responses.

Behind Nginx

To fix the CORS issue for Nginx add the following to your server config:

my-website.conf
server {
    listen 80;
    ...

    location / {
      ###################################
      # START
      # Add this block to your location
      ###################################
      
      proxy_hide_header 'Access-Control-Allow-Origin';
      proxy_hide_header 'Access-Control-Allow-Methods';
      proxy_hide_header 'Access-Control-Allow-Headers';
      proxy_hide_header 'Access-Control-Expose-Headers';

      if ($request_method = 'OPTIONS') {
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS';
        add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
        add_header 'Access-Control-Max-Age' 1728000;
        add_header 'Content-Type' 'text/plain; charset=utf-8';
        add_header 'Content-Length' 0;
        return 204;
      }

      add_header 'Access-Control-Allow-Origin' '*' always;
      add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS';
      add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
      add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
      
      ###################################
      # END
      ###################################
      
      ...
      proxy_pass http://webserver;
      ...
    }
}

[Python 3.4 or lower] Error when running Jet Bridge: AttributeError: parallel

This is because newer versions of the Pillow Python library are incompatible with Python 3.4 or lower. Install an older version to fix this error:

pip install pillow==4.3.0

[Python 3.4 or lower] Error when running Jet Bridge: AttributeError: 'module' object has no attribute 'module_from_spec'

This is because newer versions of the date parser Python library are incompatible with Python 3.4 or lower. Install an older version to fix this error:

pip install dateparser==0.7.1

[Django] Fields generated by django-modeltranslation package does not displaying and saving correctly

The problem is that django-modeltranslation patches Django models so you need to load jet_django package only after django-modeltranslation has finished its patching this way in your settings.py:

INSTALLED_APPS = (
    ...
    'modeltranslation',
    'jet_django', # load after modeltranslation
    ...
)

Last updated