Skip to content

[AssetMapper] Timeout with JavascriptSequenceParser #60516

Closed
@jmsche

Description

@jmsche

Symfony version(s) affected

7.3.0-beta2 (& beta1)

Description

Hi, after trying to upgrade to Symfony 7.3.0 (first to beta1, then to beta2) I encountered the same issue on both versions.

The issue being:

Error: Maximum execution time of 30 seconds exceeded
vendor/symfony/asset-mapper/Compiler/Parser/JavascriptSequenceParser.php:93
preg_match($this->pattern, $this->content, $matches, \PREG_OFFSET_CAPTURE, $this->cursor);

Downgrading to Symfony 7.2.x fixes the issue.

I finally made some investigations today, and it seems a plugin for Prismjs (the "bash" plugin) causes the issue, but I don't exactly know why AssetMapper stops on it.
If I remove this specific dependency from the importmap it works without issues.

How to reproduce

git clone https://github.com/jmsche/asset-mapper-7.3-prismjs.git
cd asset-mapper-7.3-prismjs
composer install
symfony serve -d
symfony open:local

You can check the symfony-7.2 branch, where the only change is a Symfony downgrade.

Note that switching back to the main branch & running composer install works, but if you drop the cache (rm -rf var/cache/*) it will start to fail again.

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions