Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: How do I use the gmaps module?

  1. #1
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes

    How do I use the gmaps module?

    I downloaded the GMaps Module on Github posted by Tridium(It's an unofficial module). After throwing the module file into the workbench, I opened up my workstation and went to the palette nav bar, and selected GMaps. As soon as I hit ok, I get an error saying:

    "Error loading pallet

    Unreleased module 'gmaps-ux' not loaded
    Code:
    javax.baja.license.LicenseDatabaseException: Unreleased module 'gmaps-ux' not loaded
       at com.tridium.sys.license.NLicenseManager.checkModuleReleaseDate(NLicenseManager.java:194)
       at com.tridium.sys.module.NModule.checkLicensed(NModule.java:124)
       at com.tridium.sys.module.ModuleManager.makeModule(ModuleManager.java:666)
       at com.tridium.sys.module.ModuleManager.findModulePart(ModuleManager.java:601)
       at com.tridium.sys.module.ModuleManager.doLoadByModulePartName(ModuleManager.java:421)
       at com.tridium.sys.module.ModuleManager.lambda$loadDependency$0(ModuleManager.java:213)
       at java.security.AccessController.doPrivileged(Native Method)
       at com.tridium.sys.module.ModuleManager.loadDependency(ModuleManager.java:212)
       at com.tridium.sys.module.ModuleManager.loadModuleParts(ModuleManager.java:269)
       at javax.baja.sys.Sys.loadModule(Sys.java:322)
       at com.tridium.workbench.sidebars.BPaletteSideBar.doUpdateTree(BPaletteSideBar.java:192)
       at com.tridium.workbench.sidebars.BPaletteSideBar$Open.doInvoke(BPaletteSideBar.java:280)
       at javax.baja.ui.Command.doInvoke(Command.java:311)
       at javax.baja.ui.Command.invoke(Command.java:281)
       at javax.baja.ui.BButton.doInvokeAction(BButton.java:149)
       at javax.baja.ui.BAbstractButton.mouseReleased(BAbstractButton.java:554)
       at javax.baja.ui.BWidget.fireMouseEvent(BWidget.java:1228)
       at com.tridium.ui.awt.MouseManager.fire(MouseManager.java:325)
       at com.tridium.ui.awt.MouseManager.fire(MouseManager.java:299)

  2. #2
    Join Date
    Sep 2013
    Posts
    1,706
    Post Likes
    Never heard of gmaps. Looks like the module is at N4.4. As of N4.9 and above modules needed to be signed. Im guessing the module is not and its throwing the error.

    https://github.com/tridium/gmaps-example


    Sent from my iPad using Tapatalk

  3. #3
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    Quote Originally Posted by bigguy158 View Post
    Never heard of gmaps. Looks like the module is at N4.4. As of N4.9 and above modules needed to be signed. Im guessing the module is not and its throwing the error.

    https://github.com/tridium/gmaps-example
    The module is self signed but you're right. It's giving me a Signature Error. Not sure what I need to do. I'm willing to dive into the code if need be but I'm not sure what I need to change(if anything).
    Name:  gmaps.PNG
Views: 145
Size:  14.8 KB

  4. #4
    Join Date
    Sep 2013
    Posts
    1,706
    Post Likes
    You can self sign at N4.9. Im not certain N4.10 and above. Maybe Orion can answer that.

    https://know.innon.com/how-to-self-s...or-niagara-4.9

    Youre asking some very interesting questions keep it up.


    Sent from my iPad using Tapatalk

  5. #5
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    Quote Originally Posted by bigguy158 View Post
    You can self sign at N4.9. Im not certain N4.10 and above. Maybe Orion can answer that.

    https://know.innon.com/how-to-self-s...or-niagara-4.9

    Youre asking some very interesting questions keep it up.
    I already went through that article yesterday. Does not seem to help. There was another article (https://know.innon.com/lower-module-security) which goes over lowering the requirements for module signatures. But I'm not sure if i should go through with that. Plus, I'm worried that the "status unknown" error might be something else.

  6. #6
    Join Date
    Jan 2003
    Location
    USA
    Posts
    8,056
    Post Likes
    Can you shoot a link to the complied jar?
    Propagating the formula. http://www.noagendashow.com/

  7. #7
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    Quote Originally Posted by orion242 View Post
    Can you shoot a link to the complied jar?
    https://github.com/tridium/gmaps-exa...1/gmaps-ux.jar

  8. #8
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    I don't think it's because of the signature.
    I tried in an older 4.4 build of Niagara (4.4.73.24) and it still won't load
    license error: unreleased module 'gmaps-ux' not loaded.
    It's failing on a "checkmoduleReleaseDate" method. This gmaps was a demo during the 2018 Niagara summit, I think 4.4 was still in beta. You might need to compile a new module from the source code provided.

  9. #9
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    That's what I'm thinking. The jar file doesn't have any security keys either and I'm pretty sure that those are generated automatically by the compiler once the project is finished. In regards to compiling the code, Should I use eclipse or IntelliJ. I know that Niagara provides some sort of platform that works with eclipse(for Ax workbench) and it probably works for n4 as well but I have also heard(no read) good things about IntelliJ.

  10. #10
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    First, a quick disclaimer as IANAD. I do know a lot has changed with the build environment, gradle version, etc. since Niagara 4.4

    Looking at the compiled module, under the META-INF folder you can see the contents of module.xml show bajaVersion="0" and I believe that's what's causing the issue. Perhaps in the developer build of Niagara you can run such modules.
    The Manifest.MF shows all of the files an their SHA-256-Digest keys. The module.xml is the last item that is signed, so modifying it here wouldn't work - that's why I suggest recompiling the module. No idea what IDE is cool these days.

  11. #11
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    I've been comparing code from different modules just to get a reference. They all seem to have bajaVersion=0 so thats likely not the issue. All of them do have security keys inside the META-INF folder so that's likely a requirement. I do not see any SHA keys inside the Manifest.MF folder(maybe that's the issue?) Also I've always been curious about the keys. since they use the SHA-265 algorithm, we should be able to edit the folder, generate a new key and insert that key into the Manifest-MF file. Would that theoretically work? or am i misunderstanding how niagara modules generate signatures?

  12. #12
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    Quote Originally Posted by DuckCube View Post
    I've been comparing code from different modules just to get a reference. They all seem to have bajaVersion=0 so thats likely not the issue. All of them do have security keys inside the META-INF folder so that's likely a requirement. I do not see any SHA keys inside the Manifest.MF folder(maybe that's the issue?) Also I've always been curious about the keys. since they use the SHA-265 algorithm, we should be able to edit the folder, generate a new key and insert that key into the Manifest-MF file. Would that theoretically work? or am i misunderstanding how niagara modules generate signatures?
    Two ways you can sign a module: at build time, or using the jarsigner tool in workbench (new feature starting in 4.8 I think).
    see the various signature statuses here: https://docs.niagara-community.com/b...-1F0024B2.html

    It seems Eclipse used to be the IDE of choice in the AX days, but with N4 they have switched to IntelliJ. There's a lot that goes on behind the scenes that I'm not super knowledge about.

  13. #13
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    I can't seem to recompile the module. I rebuilt a new module through niagara. This created all the gradle files along with a basic folder structure. I then imported all the associates files to intellij. Then i added all the code from the GitHub repository into the IntelliJ project. Anyway, it gives me an error saying that the gradle failed to run. I'm not familiar with gradle so i feel a bit out of my depth here.

    I have the folder with the necessary code. Which I'm fairly confident will work. I did notice that there is a module-permissions.xml folder which is empty ATM since idk what to have in there. I'll eventually figure that out.

    My issue here is that i can't convert said folder into an executeable jar file.

  14. #14
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    Quote Originally Posted by DuckCube View Post
    I can't seem to recompile the module. I rebuilt a new module through niagara. This created all the gradle files along with a basic folder structure. I then imported all the associates files to intellij. Then i added all the code from the GitHub repository into the IntelliJ project. Anyway, it gives me an error saying that the gradle failed to run. I'm not familiar with gradle so i feel a bit out of my depth here.

    I have the folder with the necessary code. Which I'm fairly confident will work. I did notice that there is a module-permissions.xml folder which is empty ATM since idk what to have in there. I'll eventually figure that out.

    My issue here is that i can't convert said folder into an executeable jar file.
    Since gmaps must access maps.googleapis.com (you also need an API key once you get this running), I believe you must explicitly grant access to NETWORK_COMMUNICATION in the module-permissions.xml
    I'm not sure when Tridium started using the Java security manager.

    I'm way out of my depth here too. I see Gradle automates the build process, I think in 4.4 they were still using an older version.
    In 4.6 there were some changes as Gradle got upgraded to a newer version. Some description of the process from the 2018 summit here:
    https://github.com/tridium/summit18-building-niagara

    What version of N4 are you working with?

    There was a session about thee latest build toolchains that are used with Niagara at the last summit:
    Video:
    https://share.vidyard.com/watch/RhkDaKDjpLewZwD9dbC7Rf?
    slides:
    https://www.tridium.com/content/dam/...h%20Gradle.pdf

    All summit 2022 sessions:
    https://www.tridium.com/us/en/niagarasummit/replay

  15. Likes numbawunfela liked this post.
  16. #15
    Join Date
    Apr 2015
    Location
    Omaha, NE, USA
    Posts
    126
    Post Likes
    I have compiled a module for Niagara 4 using IntelliJ using the repository found here:
    https://github.com/tridium/summit18-...ev-environment

    I did the same thing with the repository for gmap from here:
    https://github.com/tridium/gmaps-example

    But I am getting alot of eclipse errors when building such as:
    A problem occurred configuring project ':gmaps-ux'.
    > Could not resolve all artifacts for configuration 'classpath'.
    > Could not find org.eclipse.corerg.eclipse.core.commands:3.6.100.
    Searched in the following locations:
    - file:/C:/Niagara/Niagara-4.7.110.32/bin/ext/org.eclipse.core.commands-3.6.100.jar
    - file:/C:/Niagara/Niagara-4.7.110.32/bin/ext/org.eclipse.core.commands.jar
    - file:/C:/Niagara/Niagara-4.7.110.32/bin/ext/bcfips/org.eclipse.core.commands-3.6.100.jar
    - file:/C:/Niagara/Niagara-4.7.110.32/bin/ext/bcfips/org.eclipse.core.commands.jar
    - file:/C:/Niagara/Niagara-4.7.110.32/etc/m2/repository/org/eclipse/core/org.eclipse.core.commands/3.6.100/org.eclipse.core.commands-3.6.100.pom
    - https://repo.maven.apache.org/maven2...ds-3.6.100.pom
    Required by:
    unspecified:unspecified:unspecified
    unspecified:unspecified:unspecified > com.tridium:niagara-module-plugin:3.0.18 > com.tridium:niagara-slotomatic-library:1.0.2
    It looks like this example will only compile with the old IDE of using Eclipse?

    I brought up the issue of documentation lacking for developing Niagara modules with IntelliJ here:
    https://hvac-talk.com/vbb/threads/22...light=IntelliJ

  17. #16
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    Quote Originally Posted by digo View Post
    Since gmaps must access maps.googleapis.com (you also need an API key once you get this running), I believe you must explicitly grant access to NETWORK_COMMUNICATION in the module-permissions.xml
    I'm not sure when Tridium started using the Java security manager.

    I'm way out of my depth here too. I see Gradle automates the build process, I think in 4.4 they were still using an older version.
    In 4.6 there were some changes as Gradle got upgraded to a newer version. Some description of the process from the 2018 summit here:
    https://github.com/tridium/summit18-building-niagara

    What version of N4 are you working with?

    There was a session about thee latest build toolchains that are used with Niagara at the last summit:
    Video:
    https://share.vidyard.com/watch/RhkDaKDjpLewZwD9dbC7Rf?
    slides:
    https://www.tridium.com/content/dam/...h%20Gradle.pdf

    All summit 2022 sessions:
    https://www.tridium.com/us/en/niagarasummit/replay
    I'm using 4.10. I'll look through the links you just shared. I just saw the slideshows and they go through a similar process that I went through to set up a module. They also provided a lot of the template code in these so I might be able to put something together.

    I'm pretty sure 4.10 uses the security manager. I was looking at a 4.9 module and it specified permissions so... ya know

  18. #17
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,985
    Post Likes
    Quote Originally Posted by zmanvortex View Post
    I have compiled a module for Niagara 4 using IntelliJ using the repository found here:
    https://github.com/tridium/summit18-...ev-environment

    I did the same thing with the repository for gmap from here:
    https://github.com/tridium/gmaps-example

    But I am getting alot of eclipse errors when building such as:

    It looks like this example will only compile with the old IDE of using Eclipse?
    There used to be a Niagara plugin for Eclipse. Everything changes so fast, so I'm not even sure where Tridium keeps this information up-to-date. I assume developer partners get access to some secret portal.

  19. Likes bigguy158 liked this post.
  20. #18
    Join Date
    Jul 2022
    Location
    California, US
    Posts
    42
    Post Likes
    Thread Starter
    Quote Originally Posted by zmanvortex View Post
    I have compiled a module for Niagara 4 using IntelliJ using the repository found here:
    https://github.com/tridium/summit18-...ev-environment

    I did the same thing with the repository for gmap from here:
    https://github.com/tridium/gmaps-example

    But I am getting alot of eclipse errors when building such as:


    It looks like this example will only compile with the old IDE of using Eclipse?
    Do you have the niagara module plugin for eclipse? I can't download it from Tridium since the website thinks I'm not licensed.

  21. #19
    Join Date
    Apr 2015
    Location
    Omaha, NE, USA
    Posts
    126
    Post Likes
    I was unable to find the plugin for Eclipse when I looked a few months ago. It looks like they are pushing to use IntelliJ development instead, but documentation is sorely lacking on setting up and building a module.

  22. #20
    Join Date
    Apr 2015
    Location
    Omaha, NE, USA
    Posts
    126
    Post Likes
    Quote Originally Posted by DuckCube View Post
    I'm using 4.10. I'll look through the links you just shared. I just saw the slideshows and they go through a similar process that I went through to set up a module. They also provided a lot of the template code in these so I might be able to put something together.

    I'm pretty sure 4.10 uses the security manager. I was looking at a 4.9 module and it specified permissions so... ya know
    I would use the summit18 repository and modify it with the gmap code. The summit18 repository compiles fine with IntelliJ, I just don't know what is going on behind the scenes and what the settings mean.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •