Frodo script imports show up as garbage chars within AM


We are trying to do the frodo import export as observed in this video

  1. frodo script export -A -x
    • this breaks down the script json and js files with a file based reference to the js files from within

“meta”: {
“origin”: “”,
“originAmVersion”: “7.1.2”,
“exportedBy”: “amadmin”,
“exportDate”: “2023-09-27T02:54:13.201Z”,
“exportTool”: “frodo”,
“exportToolVersion”: “v1.1.0 [v18.5.0]”
“script”: {
“6b3cfd48-62d3-48ff-a96f-fe8f3a22ab30”: {
“_id”: “6b3cfd48-62d3-48ff-a96f-fe8f3a22ab30”,
“name”: “Amazon Profile Normalization”,
“description”: “Normalizes raw profile data from Amazon”,
“script”: “file://Amazon-Profile-Normalization.script.groovy”,
“default”: true,
“language”: “GROOVY”,
“createdBy”: “id=dsameuser,ou=user,dc=openam,dc=forgerock,dc=org”,
“creationDate”: 1433147666269,
“lastModifiedBy”: “id=dsameuser,ou=user,dc=openam,dc=forgerock,dc=org”,
“lastModifiedDate”: 1433147666269

  1. perform changes on the scripts as exported
  2. Import the script back to AM using the command: frodo script import -f script.json -n scriptname

The script imported this way shows up as garbage chars in AM scripts.

Is there a limitation on the tool with such import export?

I am on version 7.1.2 of AM which still does base64 encode the scripts inside the json files. Would that be the reason for this?

Please advice.

Hello @rjeghanathan , thank you for bringing this issue to our attention! I just validated what you are seeing in my own env and created an issue on the Frodo GitHub page: Frodo script imports show up as garbage chars within AM · Issue #288 · rockcarver/frodo-cli · GitHub

For context, the intention of the -x/--extract option during export was to be used with the -w/--watch option during import, so that you could edit the raw JS files in your IDE of choice and upon change, frodo would auto-import the modified files.

Your use case of exporting with -x/--extract and importing WITHOUT -w/--watch was never working or even implemented, leading to a misbehaving import and the effects you are seeing.

With the current version of frodo you might be able to use -w or --watch and that might just work for you, or you can follow as we implement your use case and then update to the latest frodo version.

1 Like

Hi @volker.scheuber
Thank you for your comments on this.

This makes sense. As long as I do a full export using the -x option and do an import it works as expected.

I understand now, we cannot create new/duplicate scripts by following this approach.

Frodo tool has been greatly useful for the development phase, keep up the nice work.

Thank you

1 Like

@rjeghanathan I’m glad to hear it! I have fixed the issue in the frodo 2.x branch, which is in pre-release state, but is stable and should soon be promoted to the latest official release of the tool.

You can download the binary containing the fix here: Release Frodo CLI 2.0.0-19 · rockcarver/frodo-cli · GitHub

1 Like