Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

Invalid regular expression: Quantifier has nothing to repeat Error on Xcode 12.5

Open k4rmakoma0 opened this issue 5 years ago • 10 comments

Description:

Cannot compile on Xcode, this error shows up on main.jsbundle, just downloaded and tried to use. Invalid regular expression: Quantifier has nothing to repeat

Environment Information:

  • Rocket.Chat App Version: 4.19
  • Device Name: iPhone 12
  • OS Version: 14.7.1

Steps to reproduce:

1.Try to compile using Xcode, no error showing up on terminal

Expected behavior:

Start rocket chat

Actual behavior:

Invalid regular expression: Quantifier has nothing to repeat on main.jsbundle

Additional context:

k4rmakoma0 avatar Sep 09 '21 22:09 k4rmakoma0

Same thing here

Works nice with simulator but not with device

stephenkopylov avatar Sep 10 '21 15:09 stephenkopylov

Can you send us more info about the error? What branch? We're working fine with develop.

diegolmello avatar Sep 10 '21 15:09 diegolmello

@diegolmello my branch is single-server

Just try to run debug configuration on device

Looks like it tries to build main.jsbundle seeing that we run it on devce while it has to use metro server

stephenkopylov avatar Sep 10 '21 15:09 stephenkopylov

the same as @stephenkopylov, on single-server branch running on debug, while release works correctly

k4rmakoma0 avatar Sep 10 '21 15:09 k4rmakoma0

I found a little bit "hacky" solution

Run release configuration with development provision profiles - you'll have "bundled" version of app but it will run

stephenkopylov avatar Sep 10 '21 15:09 stephenkopylov

It's the same also with XCode 12.4 ... as soon as I want to run it in XCode on a physical device in debug mode I'm getting this error.

jacotec avatar Sep 17 '21 13:09 jacotec

It's related to Hermes, apparently https://github.com/facebook/hermes/issues/46 There's a new version of React Native pointing to newer Hermes, so it might have been fixed there (we'll update soon). We all see that it's a debug issue only, so it should be fine on release. As workaround, we could either work on simulator only or disable Hermes. To disable Hermes, you need to:

  • set here to false https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/ios/Podfile#L11
  • run npx pod-install

diegolmello avatar Sep 17 '21 14:09 diegolmello

I was able to fix this issue by using node v15.12.0

agent3bood avatar Oct 11 '21 21:10 agent3bood

It's related to Hermes, apparently facebook/hermes#46 There's a new version of React Native pointing to newer Hermes, so it might have been fixed there (we'll update soon). We all see that it's a debug issue only, so it should be fine on release. As workaround, we could either work on simulator only or disable Hermes. To disable Hermes, you need to:

  • set here to false https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/ios/Podfile#L11
  • run npx pod-install

Thanks you!. Someone fix this issue ?

dungnguyennvd avatar Jan 17 '22 09:01 dungnguyennvd

Seems inconsistent, maybe it's lack of ios dev experience, but sometimes Xcode builds it no problem others it fusses. When it does complain I just disable Hermes and it works.

tkyser-rodeo avatar Jan 25 '22 16:01 tkyser-rodeo