New program to help set up VASL scenarios

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
The change needs to be made to logging.yaml.example.
Yeah, that’s what I did. I was typing this message between customers at work and wrote the wrong thing.

This command (and the others following it) need to be run inside the container i.e. run the docker exec command I gave earlier.
That’s what I did.

There might be a Docker configuration setting or Mac security policy stopping it, or maybe a virus checker interfering with the process - I can't really help you with this.
This is where I’ll have to check next. I was just starting to wonder myself if there was a permissions thing going on. I’ll see what I can come up with and if I find a solution I’ll be sure to share it here for any others.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
This is where I’ll have to check next. I was just starting to wonder myself if there was a permissions thing going on.
You need to get the /data/ directory to appear in the container, with the vasl.vmod file in it (and any other stuff that you've mapped in e.g. boards directory, VASSAL directory, etc.). The code shows images in the UI by extracting them from the VASL .vmod, so if that file is not mapped into the container, it will never work.

If the curl command I gave earlier gives a 200, that means counter images are working inside the container, so if you're still getting broken images outside the container, that means there's a problem transmitting images from the container to the browser. But I suspect that once you get the .vmod file to appear inside the container, everything will Just Work (TM).

All the run-container.sh script does is take the input parameters and assemble a docker run command, which it then executes (around line 213). If there's a problem with how it's doing that, if you put echo at the start of the docker run command, it will just print the command out instead. You can then copy it, and fiddle with it to try get it working.
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
This is what my data directory looks like:
Code:
$ docker exec -it vasl-templates  /bin/bash
[app@c36fc12ba9da app]$ ls -l /data/
total 21976
drwxrwxrwx.  6 app  app     12288 Jun 22  2020 boards
drwxrwxr-x. 30 app  app      4096 Apr  3 03:17 chapter-h-notes
drwxrwxrwt. 50 root root     2360 Jul 18 05:40 user-files
drwxrwxr-x.  2 app  app      4096 Dec 10  2021 vasl-extensions
-rwxrwxrwx.  1 app  app  22474869 Apr  3 08:11 vasl.vmod
drwxr-xr-x.  4 app  app      4096 Mar 29 18:36 vassal
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
in container:

Code:
uid=1000(app) gid=1000(app) groups=1000(app)
in computer:

Code:
uid=501(graystonulery) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Edit the file Dockerfile (in the same directory as run-container.sh), find the line that says "USER app", and before it, add the following:
Code:
RUN useradd --uid 501 --create-home app
Then restart the container.

If that doesn't work, try deleting both lines.
 

Stewart

Elder Member
Joined
Jun 20, 2006
Messages
3,382
Reaction score
625
Location
Russia
Country
llRussia
Error messages of Mod not configured.
And no images appear even though set to internet.

I'm not exactly sure what it's not finding or how to configure.
 

Paul_RS

Elder Member
Joined
Feb 14, 2010
Messages
1,723
Reaction score
765
Location
Gammonopolis
Country
llUnited Kingdom
just a pointer for those using this program who may encounter 'shim' errors when uploading the data to a saved game file. I've found that the error, for me, was confined to the multi applicable notes.

I have the electronic version of the rule book and use notepad to edit the empty HTML files in the Chapter H folders in the program. I copy and paste from the rulebook when it is open in MS Edge.

The problem I've encountered is when words are split in the copy and paste process. You may not notice gaps when you paste the text but if you open the HTML file after you've pasted your text, you'll see that a square symbol has been inserted in the gap in the word (this symbol isn't in the pasted text but appears in the HTML file}.

this will prevent the program for loading data to your saved game file. The dreaded shim errors.

Top tip. Double check each multi-applicable note as you populate it and ensure you get rid of any square symbols by editing the HTML file and closing the gaps in the words within the file using your text editor. this will solve the error problem.

It worked for me.

Cheers

Paul

Win 10, MS Edge. 64 bit
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
Edit the file Dockerfile (in the same directory as run-container.sh), find the line that says "USER app", and before it, add the following:
Code:
RUN useradd --uid 501 --create-home app
Then restart the container.

If that doesn't work, try deleting both lines.
Tried each of the above. No change.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
The problem I've encountered is when words are split in the copy and paste process. You may not notice gaps when you paste the text but if you open the HTML file after you've pasted your text, you'll see that a square symbol has been inserted in the gap in the word (this symbol isn't in the pasted text but appears in the HTML file}.
Thanks for the tip 👍 It's not splitting words that's the problem, it's the funny squares.

TL;DR: always use UTF-8 when saving files.

Whenever there are non-English characters e.g. Lunéville or Fallschirmjäger, there are different ways a computer can store it (known as the "encoding"), so you need to make sure everyone's using the same encoding, otherwise things get confused. That's why you see a square box, because the program can't figure out what character to show.

vasl-templates uses the UTF-8 encoding (the most popular one), and most editors will have an option to specify which encoding to use when you save (and load) a file. If you're seeing square boxes, or garbled content, it's almost certainly an encoding problem, and things won't work properly - at best, the content won't be shown properly, at worst, things will crash.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Tried each of the above. No change.
At this point, I think it's something external to vasl-templates.

There is a GUI for configuring Docker - see if there's something in there that controls what directories can be mapped into containers.

There's also something called SELinux that controls access - it's unlikely that it's enabled on a Mac, but they might have something similar. If you're on a work computer, there might be security policies in place that wouldn't be on a home computer.
 

Stewart

Elder Member
Joined
Jun 20, 2006
Messages
3,382
Reaction score
625
Location
Russia
Country
llRussia
What is the format to include width and height to adjust images inputted from a location?
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
At this point, I think it's something external to vasl-templates.

There is a GUI for configuring Docker - see if there's something in there that controls what directories can be mapped into containers.

There's also something called SELinux that controls access - it's unlikely that it's enabled on a Mac, but they might have something similar. If you're on a work computer, there might be security policies in place that wouldn't be on a home computer.
Thanks again for your assistance, and if I find a solution I'll let everyone know!
 

punchdrunk

Recruit
Joined
Jul 30, 2022
Messages
9
Reaction score
4
Country
llCanada
I'm setting up vasl-templates on a Mac. I think I've got everything working except that it won't connect to the ASL Scenario Archive to get details. Both the desktop and web app complain about the SSL certificate:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

I'm using Vassal 3.6.7/VASL 6.6.4. Anyone have any ideas?
 

punchdrunk

Recruit
Joined
Jul 30, 2022
Messages
9
Reaction score
4
Country
llCanada
No, but how'd you get the images to show up in the vehicle / ordnance tabs?
Looking back at your problems, have you built the vassal-shim? This isn’t mentioned in the Installation instructions, but is on the For Developers page. You need that or vasl-templates’ python stuff can’t talk to vasl’s Java stuff. Once I had that built all the images worked fine. Also I didn’t use Docker to keep it as simple as possible.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
I'm guessing you're running from source. Python often has problems with SSL certificates, so try some of the things suggested on this page. If you're using an old version of Python, that might be causing it as well (since it may not have the latest certs).
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Looking back at your problems, have you built the vassal-shim? This isn’t mentioned in the Installation instructions, but is on the For Developers page. You need that or vasl-templates’ python stuff can’t talk to vasl’s Java stuff.
This is only necessary if you make changes to the code. If you just want to use vasl-templates, the vassal-shim JAR is in source control, and can be just used as-is.

Also I didn’t use Docker to keep it as simple as possible.
This is why Graystonw is having problems. Docker containers don't have access to files on the host computer, so anything that's needed must be mapped into the container. Something is interfering with this, so the code can't load the VASL .vmod file, and so it can't get any of the counter images from that file.
 
Top