Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find a suitable filter configuration for the asset #709

Open
matzeeable opened this issue Aug 17, 2021 · 4 comments
Open

Cannot find a suitable filter configuration for the asset #709

matzeeable opened this issue Aug 17, 2021 · 4 comments

Comments

@matzeeable
Copy link

Hey!

When I try to push the following file real-media-library.pot I get the following error on CLI side:

$ push -r 'plugins/real-media-library/backend' -ft PO

Push assets to repository: plugins/real-media-library/backend

 - Uploading: real-media-library.pot
 --> asset id: 1, task: 29

Running, task id: 29 
Updating asset: real-media-library.pot (30) Done
Process asset: 1 (31) Failed
An unexpected error happened, task=31
Error stack
null
  Extracting text units from asset (32) Failed
An unexpected error happened, task=32
Error stack
null

An unexpected error happened, task=31

Fatal error: Could not push to repository

When I check the webapp log, I get the following error:

2021-08-17 09:40:33.184 ERROR 1 --- [ pollableTask-3] c.b.l.m.s.pollableTask.PollableCallable  : Unexpected error happened while executing the task (if the error is known to happen it should be caught and wrapped into an checked exception to stop logging it as an error)

com.box.l10n.mojito.service.assetExtraction.extractor.UnsupportedAssetFilterTypeException: Cannot find a suitable filter configuration for the asset: real-media-library.pot
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetPathToFilterConfigMapper.getAssetFilterTypeFromPath(AssetPathToFilterConfigMapper.java:103)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetPathToFilterConfigMapper.getFilterConfigIdFromPath(AssetPathToFilterConfigMapper.java:85)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor.getFilterConfigIdForAsset(AssetExtractor.java:106)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor.performAssetExtraction_aroundBody0(AssetExtractor.java:70)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor$AjcClosure1.run(AssetExtractor.java:1)
        at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:221)
        at com.box.l10n.mojito.service.pollableTask.PollableCallable.call(PollableCallable.java:53)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.box.l10n.mojito.service.pollableTask.PollableAspect.syncExecute(PollableAspect.java:118)
        at com.box.l10n.mojito.service.pollableTask.PollableAspect.ajc$inlineAccessMethod$com_box_l10n_mojito_service_pollableTask_PollableAspect$com_box_l10n_mojito_service_pollableTask_PollableAspect$syncExecute(PollableAspect.java:1)
        at com.box.l10n.mojito.service.pollableTask.PollableAspect.createPollableWrapper(PollableAspect.java:81)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor.performAssetExtraction_aroundBody2(AssetExtractor.java:52)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor$AjcClosure3.run(AssetExtractor.java:1)
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:66)
        at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:72)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70)
        at com.box.l10n.mojito.service.assetExtraction.extractor.AssetExtractor.performAssetExtraction(AssetExtractor.java:52)
        at com.box.l10n.mojito.service.assetExtraction.AssetExtractionService.processAsset_aroundBody0(AssetExtractionService.java:80)
        at com.box.l10n.mojito.service.assetExtraction.AssetExtractionService$AjcClosure1.run(AssetExtractionService.java:1)
        at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:221)
        at com.box.l10n.mojito.service.pollableTask.PollableCallable.call(PollableCallable.java:53)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:80)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

I do not know what exactly could be wrong here, as the extension is .pot and should be resolved by

I am using the latest docker image from https://github.com/box/mojito/tree/master/docker for both CLI and webapp.

Regards,
Matthew 😊

@aurambaj
Copy link
Collaborator

I ran a quick test with similar repository/filenames and it seems to work fine. $ push -r 'plugins/real-media-library/backend' -ft PO is push an alias? asking since it does show mojito command. Have you tried to clean/rebuild, was there any changed introduced?

@matzeeable
Copy link
Author

Did you also test with your latest docker image? When I run docker-compose up with the following compose file, I get the above error:

version: "3"

networks:
    mojito: {}

volumes:
    mojito_mysql_data:

services:
    mojito_owlsrv_de_mysql:
        image: mysql:5.7
        volumes:
            - mojito_mysql_data:/var/lib/mysql:rw
        restart: always
        networks:
            - mojito
        environment:
            MYSQL_ROOT_PASSWORD: ${MOJITO_DB_ROOT_PASS}
            MYSQL_DATABASE: mojito
            MYSQL_USER: ${MOJITO_DB_USER}
            MYSQL_PASSWORD: ${MOJITO_DB_PASS}
        command:
            - --character-set-server=utf8mb4
            - --collation-server=utf8mb4_bin

    mojito_owlsrv_de_webapp:
        depends_on: [mojito_owlsrv_de_mysql]
        image: aurambaj/mojito-webapp:latest
        networks:
            - mojito
        restart: always
        ports:
            - "10000:80"
        environment:
            MOJITO_DB_HOST: mojito_owlsrv_de_mysql
            MOJITO_DB_PORT: 3306
            MOJITO_DB_NAME: mojito
            MOJITO_DB_USER: ${MOJITO_DB_USER}
            MOJITO_DB_PASS: ${MOJITO_DB_PASS}

Regards,
Matthew 😊

@aurambaj
Copy link
Collaborator

@matzeeable that docker compose file is not part of this project so I don't know exactly where it is coming from.

aurambaj/mojito-webapp is just my sandbox and I recently updated the with something that is not backward compatible with previous version hence the potential issue. But it shouldn't be used since it is my sandbox.

What are you trying to do exactly? Do already have an install that you are trying to fix? Or are you trying to get started from scratch?

Docker files I wrote can be found here: https://github.com/box/mojito/tree/master/docker

@matzeeable
Copy link
Author

matzeeable commented Aug 23, 2021

Hey @aurambaj !

This docker-compose.yml I wrote myself, but the essential part of that is the used image aurambaj/mojito-webapp.

What are you trying to do exactly?

Within our organization we do containerize all used services, even the external one if they provide an image. This speeds up things, we can provide isolated environments and it is more maintainable. What I want to do is very basic: use the mojito webapp within a docker container.

Do already have an install that you are trying to fix? Or are you trying to get started from scratch?

Yeah, I am starting from scratch with mojito (if you remember, I also requested #685).

Docker files I wrote can be found here

Yeah, that's the image I am using within my docker-compose.

Thanks for your awesome and quick support! :-)

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

No branches or pull requests

2 participants