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.
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?
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.
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?
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.
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.
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).
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.
@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.
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.