Skip to content

Conversation

@al-sabr
Copy link

@al-sabr al-sabr commented Aug 26, 2024

The identified problem arises at line (352 in original file) which triggers a catch at line (393 in original file).

The loop parse the first folder of the zip file and directly goes into catching the exception at line (393 in original file) by ignoring the other folders in the zip file which is not correct. By adding the additional catch statements the other folders are parsed and an error is shown. If during the parsing a folder in the zip file contains the manifest file the processing continues.

Example of the error messages:

Error occurred: bundle.symbolic_name is not defined in the bundle manifest for bundle assets (location=/mnt/dev/c++/bismika/build/plugins/libresources_plugin.so).
Error occurred: bundle.symbolic_name is not defined in the bundle manifest for bundle src (location=/mnt/dev/c++/bismika/build/plugins/libresources_plugin.so).
Error occurred: bundle.symbolic_name is not defined in the bundle manifest for bundle style (location=/mnt/dev/c++/bismika/build/plugins/libresources_plugin.so).

in this case the embedded zip file has a resources_plugin folder containing the manifest.json.

To see how the bundle with the embedded files is handled check the bundles/resources_plugin sub-project.

…o catching the exception at line (375 in original file) (393 in this modified file) without parsing the other folders in the zip file which is not correct but by adding the additional catch statements it is handled by an error .
@al-sabr
Copy link
Author

al-sabr commented Aug 26, 2024

This is an attempt to re-debug the bismika project with the original CppMicroServices repository to identify why the manifest file for the test bundle resources_plugin is never found. The debug starts from scratch to identify and find the parsing loop causing the problem.

Problematic repo : https://github.com/al-sabr/bismika/tree/main
Solution repo : https://github.com/al-sabr/bismika/tree/PR%401036-test-bundleregistry-embedded-manifest-bug

This is a re-attempt for the following issue : #1025 and the following PR : #1026

@al-sabr
Copy link
Author

al-sabr commented Sep 2, 2024

Any feedback ?

@jeffdiclemente
Copy link
Member

Any feedback ?

The issue described in this PR appears to stem from the same root cause as described in PR #1037 , namely, the bundle resource ZIP file format is not being followed. If bundle resources need to be accessed using the CppMicroServices bundle resource APIs, those resources need to be structured in the ZIP file appropriately (put into a "bundle symbolic name" folder). If the resources in the ZIP file are not supposed to be associated with a bundle and it doesn't make sense for the resources to be part of any bundle, then using the CppMicroServices bundle resource API is not the correct API to use and another mechanism other than CppMicroServices should be used to access resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants