Forum Discussion
Can we have multiple fixes at the same time
Thank you so much for the response!i am continuously seeing this error also
Package support framework
Error: Could not find matching appid in config.json and appx manifest:
Element not found
(1168)
Though the error is very descriptive an informative but when i look back at my json and appx manifest, i see they have matching element.it seems something else is missing out.
Thank you,
Vikas
tester2420 When the PSF is not in use, you can do whatever you want in the manifest for the AppID field, but not so when the PSF is in use.
The PsfLauncher uses an algorithm that takes the name of its process and turns it into an AppID that matches how the MSIX Packaging tool would have created it. It then looks for an application entry in the config.json file that matches that AppId. The algorithm is still undocumented to the best of my knowledge, but James Pike provided an unofficial summary of it in this reply on the community portal.
So if your PsfLauncher64.exe is the process, the config.json entry for the application should have an appid of "PSFLAUNCHERSIXFOUR". Totally obvious, right?
- marcinotorowskiMay 04, 2020Brass Contributor
Like TIMOTHY_MANGAN replied, but with a short extra bit of info. You can use Notepad$ to indicate everything that ends with Notepad, or ^Notepad to indicate things that start with Notepad. Plus (+) is a special regexp character denoting one or more repetitions of the previous token, so you cannot use it literally. Instead, you should escape it by escaping it with a backslash character. However, since JSON file on its own uses backslash as an escaping sequence you should actually use two backslashes, like:
executable: "Notepad\\+\\+"
This should produce a correct regex for PSF runtime.
- May 04, 2020
For anyone wanting to know the full syntax, you can search the web for Regex syntax info, but keep in mind that there are several dialects; Microsoft is using the ECM variant. https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options
- tester2420Apr 04, 2020Copper Contributor
Thanks once again for the reply, I was trying to update the config file to see the success but PSFLauncher64.exe is haunting me, its continue to crash, so i took the latest branch and was trying to compile
I see initialize has 3 arguments
void Initialize(const psf::json_object* appConfig, const std::filesystem::path& currentDirectory, const std::filesystem::path& packageRootDirectory)
but only 2 params are passed.
powershellScriptRunner.Initialize(appConfig, currentDirectory);
the branch I cloned is :
https://github.com/microsoft/MSIX-PackageSupportFramework/tree/develop
and its a compilation error.
Anything I am missing?
Thank you,
Vikas
- tester2420Apr 04, 2020Copper ContributorLocally fixed it
powershellScriptRunner.Initialize(appConfig, currentDirectory, packageRoot); - Tim ManganApr 04, 2020MVP
tester2420 Good. That's what I was going to suggest. I discovered earlier this week that some of the changes in the PR didn't get integrated causing the issue you've seen. There will be a new PR shortly to fix that in the sources. I don't think any other issues from the missing changes should affect you.
- Sleeping_DeveloperApr 30, 2020Copper Contributor
Dear Tim Mangan
I have another doubt, let say there is more than one entry point and i want to apply fix, Id will be
"id": "PSFLAUNCHERSIXFOUR" for each entry point and this will lead to schema validation error.
How to handle this situation.
Kind regards,
Vikas
- Apr 30, 2020
Sleeping_Developer The solution to the multiple entrypoints to the same exe issue I solve by making copies of the PsfLauncherxx.exe file. Each entrypoint gets a unique name, and thus unique munged ID.
In PsfTooling they get copied as Psflauncher1.exe, PsfLauncher2.exe, and so on for the shortcuts; PsfLauncherFTA1.exe and so on for the FTAs (when necessary). You could keep the bitness in those names, but the munched ID is capped at 16 characters so watch out.
- tester2420Apr 30, 2020Copper Contributor
Thank you so much TIMOTHY_MANGAN , i have tried this and its working, Great!
now i am wondering if we can have two fixes for the same entry points(exe).
- tester2420May 01, 2020Copper Contributor
Dear Tim,
I am having another encoding problem with notepad++
my config.json looks like this
"applications": [
{
"id": "PSFLAUNCHERSIXFOUR",
"executable": "VFS/ProgramFilesX86/Notepad++/notepad++.exe",
"workingDirectory": "VFS/ProgramFilesX86/Notepad++"
}
],
"processes": [
{
"executable": "notepad++",and once i build the msix and launch it is giving regex error around encoding(i believe) regex_error
---------------------------
Package Support Framework
---------------------------
regex_error(error_badrepeat): One of *?+{ was not preceded by a valid regular expression.
---------------------------
OK
---------------------------Please let me know if there is any solution for this i have tried escaping and encoding + by %20.
Kind Regards,
Vikas
- May 01, 2020
tester2420 The fixups are applied and configured on the basis of the filename of the launched process, so while you can use the launcher for different command arguments to the same target process, the target process will get the same fixups and fixup configuration. But you really should be able to have a single configuration that works for both launch points.