HTML file not loaded via readfile message inside a jweb object because of missing path (until I unfreeze the device)

Federico Pepe's icon

Hey there, I'm a Max for Live beginner, and I have a strange issue that I can't really understand.

In short:

  1. I create a new Max project

  2. I imported all the files into the Project's Inspector (see attached screenshot)

  3. I consolidate the project

  4. Then I exported the .amxd file via the Project's Inspector

  5. Opened the .axmd file, and then froze and locked it before saving it again

Inside my patch, I have a jweb object that loads the .html file contained in the project itself via

readfile ../other/push-visualizer.html 

Now, the problem I’m having is that when I load the .amxd on my second laptop, the HTML file doesn’t load. After a few tests, I know for sure that there’s a path issue and the patch can’t find the HTML file.

What’s odd, though, is that as soon as I unfreeze the device, the files are copied:

~/Documents/Max 9/Max for Live Device/...

If I then reload the .axmd, or click on the message box that loads the .html, it works as expected.

Is there a way to fix this issue so I can distribute the .axmd without asking the end user to unfreeze the device to make it work?

Joshua Kit Clayton's icon

You'll want to create an embedded search path folder like described in the node for max documentation. This will unpack the embedded search path folder to a temporary folder where it can be loaded by jweb. Don't have the folder managed in your project directly, but only as a search path.

Hope this helps!