0

I followed Autodesk disconnected Workflow to run forge viewer on my Android phone. I am running this as a HTTPS server on my local machine. According to make it as HTTPS, I have done following changes to Server.js file.

const express = require('express');
var https = require('https');
const path = require('path');
const fs = require('fs');

let app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.use(require('./routes/auth'));
app.use(require('./routes/data'));

var options = {
    key: fs.readFileSync(path.join(__dirname, 'cert', 'myKey.key')),
    cert: fs.readFileSync(path.join(__dirname, 'cert', 'myCer.cer'))

};
https.createServer(options,app).listen(1880);

My problem is, when I browse the url for this server on Android app's Chrome WebView I am getting the following error.

[chromium] [INFO:CONSOLE(20)] "Uncaught TypeError: Cannot read property 'Initializer' of undefined", source: https://example.com:1880/javascript/main.js (20)

but this works on my local machine browser (as https). What is the reason for this? Please help me. thanks

EDIT 1 My android device is running Android 8.0.0

Randi
  • 639
  • 2
  • 6
  • 23
  • 1
    1) Does the app run OK in Chrome on your Android device? 2) You could just run your app locally as HTTP and use something like ngrok that will provide an HTTPS address you can use to load your page - that will also have a proper SSL certificate that all browsers accept (unlike the self-generated ones) – Adam Nagy Feb 01 '23 at 21:39
  • 1
    @AdamNagy Hosting on an external server resolved the issue. – Randi Feb 02 '23 at 03:48

0 Answers0