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

[Bug] PatternSyntaxException: Unexpected internal error near index 1 in the MagentoBasePathUtil.isMagentoFolderValid:35 #1058

Closed
Taral-Patoliya opened this issue Apr 6, 2022 · 5 comments

Comments

@Taral-Patoliya
Copy link

Taral-Patoliya commented Apr 6, 2022

Describe the bug (*)

A clear and concise description of what the bug is.

java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
	at java.base/java.util.regex.Pattern.error(Pattern.java:2027)
	at java.base/java.util.regex.Pattern.compile(Pattern.java:1788)
	at java.base/java.util.regex.Pattern.<init>(Pattern.java:1428)
	at java.base/java.util.regex.Pattern.compile(Pattern.java:1068)
	at java.base/java.lang.String.split(String.java:2317)
	at java.base/java.lang.String.split(String.java:2364)
	at com.magento.idea.magento2plugin.util.magento.MagentoBasePathUtil.isMagentoFolderValid(MagentoBasePathUtil.java:35)
	at com.magento.idea.magento2plugin.project.ProjectDetector.lambda$configureProject$0(ProjectDetector.java:36)
	at com.intellij.openapi.project.DumbServiceImpl.lambda$smartInvokeLater$9(DumbServiceImpl.java:530)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce (*)

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior (*)

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information: (*)

  • OS: Windows 11 10.0
  • PhpStorm/Intellij version: 2021.3.3
  • Plugin Version: 4.3.0

Additional context

Mainline branch: 4.3.1-develop

@m2-assistant
Copy link

m2-assistant bot commented Apr 6, 2022

Hi @Taral-Patoliya. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


@barcellosatwix
Copy link

Hi @Taral-Patoliya, could you give us more information about the steps to reproduce this bug? Thanks!

@bohdan-harniuk
Copy link
Collaborator

Hello, @Taral-Patoliya!

Thank you for your report!
We'll try to solve this issue.

Regards,

@bohdan-harniuk bohdan-harniuk self-assigned this Apr 7, 2022
@bohdan-harniuk bohdan-harniuk changed the title Bug Report 2022/04/06 [Bug] PatternSyntaxException: Unexpected internal error near index 1 in the MagentoBasePathUtil.isMagentoFolderValid:35 Apr 7, 2022
@Iamwade
Copy link
Collaborator

Iamwade commented Apr 11, 2022

Hi @bohdan-harniuk I did pre-test and reproduce the bug on the 4.3.0-develop branch
image
After testing on the 1058-fix-file-separator-for-windows branch, I was unable to reproduce this error
image

For testing, I specifically deployed and configured the environment on Windows 10 Pro

Approve. Good job!

@bohdan-harniuk
Copy link
Collaborator

Hello, @Taral-Patoliya!

This fix has been already released.
Please, update your plugin version to the latest available: 4.3.1.

cc., @bashari10, @kanevbg, @twtoolsnet, @Bashev, @spyrmp, @miljkovic5, @Hoszi, @lucasmichel13, @artmouse, @pisicabogdan, @rnoboa, @aletoropov, @Justinschouten97, @bgushurst.

Regards,

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

No branches or pull requests

4 participants