Module status page doesn't show up on V8 platform

We are trying to migrate our module to Ignition 8.1.7 platform, after recompile the “status page” doesn’t show up correctly, the scripting function works correctly. The javascript is written in exactly same format from this Github example, it works great on v7.

It appears the js file doesn’t call the /data endpoint to retrieve module status, and we verified the endpoint (route) returns properly if called.

Lastly, we installed the same GitHub example ^ on the gateway as well, and the status page doesn’t show up either.

I just built a clean copy of the ‘gateway-webpage’ example, signed it, and installed into a clean installation of 8.1.9 and it appears to be functioning as expected.

Are you seeing any errors in the browser console or gw logs? Are the files (js, etc) being correctly fetched and loaded if you inspect the network traffic in the web dev tools network page?

edit: Might also help if you share which JDK (vendor and version) you are using to compile.

Thanks a lot for looking into this.

Attached are the network traffic between v7 vs. v8. The js file for the status page is twsstatus.js, and in v7 it calls route “endpoint” to get module status but it’s not calling it in v8. Also I’m attaching the network traffic for the HomeConnect Example, starting from “homeconnectstatus.js”.

I didn’t sign the module, not sure if that would make a difference. Would it possible to share the modl file you compiled for the example module so we can cross check?

The JDK we are using is:
openjdk@11: stable 11.0.10 (bottled) [keg-only]
Development kit for the Java programming language
https://openjdk.java.net/
/usr/local/Cellar/openjdk@11/11.0.8 (650 files, 295.1MB)
Poured from bottle on 2020-10-11 at 17:18:33
From: homebrew-core/openjdk@11.rb at c0214266f94a8281882a6a722d8025fca04ecc8a · Homebrew/homebrew-core · GitHub

Example module
HomeConnect-v8

v8 platform
v8

v7 platform
v7

Yes, signing can make a difference. You'll need to make sure the gateway is running with the ignition.allowUnsignedModules=true property set in your ignition.conf as a jvm param.

Yep! See attached: GatewayWebpageExample.modl (71.2 KB)

Let me know if that works for you, and we'll figure out the next steps depending on the outcome.

edit: also, the JDK you have should be ok.

Hi, thanks a lot for the info.

I installed the module on our server and the status page still doesn’t come up. I also install it on my local machine gateway and got the same result.

To further check, attached is the HomeConnect module I build, could you help install to check if the status page works? If it shows up then it’s probably gateway related?

And I checked we have both these set to true:

  • ignition.allowunsignedmodules=true
  • ia.developer.moduleupload=true

Thank you!
Gateway-Webpage-Example-unsigned.modl (73.3 KB)

Can you try to upload again now?

Thanks Kevin. I uploaded the modl file in original post.

@PerryAJ fwiw it doesn’t work for me either.

This is from the dev tools console:

Failed to load /main/res/hce/js/homeconnectstatus.js because of TypeError: _react2.default.PropTypes is undefined

That’s strange - it loads without error for me (chrome and firefox). I’ll try to make some more time today to see if I can reproduce the error you’re hitting.

Thank you both. Just checked our module has the same error in console:

main/res/tws/js/twsstatus.js because of TypeError: undefined is not an object (evaluating ‘_react2.default.PropTypes.object’)

I was able to reproduce the error, not sure why I didn’t hit it before. I suspect it’s erring due to updates to react and/or react-dom, but am working on solving the issue and will update this thread when I have a solution. Trying to sort it out now, but may not get it done before end of day. Either way, will update when I have more info.

1 Like

Ok, I have a Draft PR up on the examples page to address the issues. There were a few changes made, mostly as fallout from updating dependencies in the javascript package.

See if this version of the module fixes your issue, and if so, you’ll need to update versions of your own module (or find workarounds for the lack of PropTypes and React.createClass in the more recent versions of react - see the package.json in the example for version details/changes).

GatewayWebpageExample.modl (75.1 KB)

1 Like

Thank you @PerryAJ , the example works on our gateway now, I’ll check your PR and modify the js accordingly, will update once complete.

Good to hear. I’m done for the day, but will finalize that PR after a quick second-look tomorrow. Let me know if you have any questions about the changes.

Thanks @PerryAJ , changed my js file according to the PR and it works now! :grinning:

1 Like

@PerryAJ I am also working through this issue.

if I download the module from here, the status page will show up:

GatewayWebpageExample.modl (75.1 KB)

However, if I clone the master (I did a fresh clone today) from git and run mvn-package in intelliJ, the status page does not show up.

I want to make sure I am able to build my own, so any advice on where to look will be appreciated.

Edit:

The specific error I see is:

GET http://localhost:8088/res/hce/js/homeconnectstatus.js?_=1631563547468 404 (Not Found)

Thanks,

Nick

@PerryAJ I have answered my own question. The issue is that the way the read me is written (or more likely, my interpretation of it) is that you can clone this example, package it, and use it as it. That is incorrect. It is necessary to get all the way through “npm run build”. If it is not correct, the size of the module file will be about 15KB. Once the javascript portion is built, it will grow to around 75KB.

After I ran the following, everything showed up fine. I am using windows nvm.

# all of these commands were run in the following directory:
# ignition-sdk-examples\gateway-webpage\gateway-webpage-gateway\src\main\javascript

nvm use 16.9.1
npm install
npm run build:dev

If you think its worthwhile, I could add a pull request to make the read me more explicit on this point.

Thanks,

Nick

Sorry about the ambiguity. Feel free to PR with improvements and we'll def give it a look. In the not-so-distant future we're going to be updating the examples that rely on js being bundled so that they execute as part of the build much like the perspective example does, but I'm sure people will appreciate readme improvements in the meantime.

@PerryAJ

For now I have submitted pull request 78.

Hopefully it can help someone who is quite new to the module building process, like me.

Thanks,

Nick