iOS: Invalid regular expression: Invalid Flag - can't use mm anymore

Summary

iOS: App crashes whenever I try to type or send anything.

Steps to reproduce

  • Open the app
  • click on the input bar -> Keyboard appears
  • type any character

App Version: 1.32.2 (Build 307)
Server Version: 5.24.0
Data bank: mysql

System I use:

  • iPhone 6S
  • iOS 11.2.1 (15C153)
  • Jailbreak: no

Expected behavior

I can chat with everyone and every group.

Observed behavior

The app just reports an error (twice) and stops working. It tells me to restart the app.

I sent the error report to my mail, which I post here:

(please take note that this is a report from May, but the newer one is basically the same, but it now shows the error code inside a messagebox and not inside the mail for error reporting. Also some numbers are slightly different, but the error message is the same.)

Please share a description of the problem:

Trying to type anything in any channel and it immediately crashes.

Keyboard is still the same, in general the whole system has not been changed in the past year.

Tryed reinstalling the application, no

Current User Id: wfx57ds8h3bmfphzcnzer91xxr

Current Team Id: ud7iebt8yiya3cy45rkty7fher

Server Version: 5.22.0 (Build 5.22.0)

App Version: 1.30.1 (Build 287)

App Platform: ios

Errors:

Date: Tue, 05 May 2020 05:45:27 GMT

Message: Invalid regular expression: invalid flags

Stack trace:

switchKeyboardForCodeBlocks@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1253:345

handlePostDraftSelectionChanged@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1716:5488

handleOnSelectionChange@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1716:5255

_onSelectionChange@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:324:5907

_onSelectionChange@[native code]

b@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:1197

k@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:1340

_@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:1394

N@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:1692

A@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:2482

z@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:2297

/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13394

ke@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:88110

Pe@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13062

Ne@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13235

receiveEvent@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13644

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:3685

/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:841

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:2939

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:813

value@[native code]

Date: Tue, 05 May 2020 05:45:27 GMT

Message: Invalid regular expression: invalid flags

Stack trace:

switchKeyboardForCodeBlocks@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1253:345

handlePostDraftSelectionChanged@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1716:5488

/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:1716:7164

Dn@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:30252

An@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:29912

Al@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:76365

Al@[native code]

unstable_runWithPriority@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:138:3406

Ml@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:74066

Ml@[native code]

_l@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:65290

_l@[native code]

/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:24975

unstable_runWithPriority@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:138:3406

un@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:24922

on@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:24857

ke@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:88137

Pe@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13062

Ne@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13235

receiveEvent@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:120:13644

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:3685

/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:841

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:2939

value@/var/containers/Bundle/Application/5B907024-F522-41BC-95BF-9EC1802CAE58/Mattermost.app/main.jsbundle:36:813

value@[native code]

===================================================

I already reinstalled the application and uninstalled any additional keyboard-features like Grammarly. I also reset my phone to an old backup where the app was supposed to still work. First time I encountered this issue was May this year. Backup from December last year didn’t helped after installing the latest version. Funnily I get the same error on my iPad too, which also runs on iOS 11.2.1. Since I need this specific version of iOS, I can’t update the whole system yet. But even then I don’t really understand why this error came out of nowhere. It was working fine for a long time.

I appreciate any help. Thank you in advance!

@elias FYI on this in case the log errors indicate what the issue may be. If not, I’ll ask support to take a look.

There was a feature added about code blocks.

Question, does this happen regardless of the text you enter? If so, it may very well be the JSC version that ships with iOS 11.2.1

I can’t type anything at all. After I hit any character, it immediatly shows up the error message. Different languages doesn’t matter as well. I also tried copying a text and then paste it there but it also doesn’t work. My only way to communicate through out mattermost is (I know it’s ridiculous~) to write my text into some else app (like notes) and then screen-shot it and send it as a picture (which also causes the app to crash!).

I’ve confirmed that the problem is the JavaScript Core engine that ships with iOS 11.2 and below, updating the OS should solve this issue.

Another thing that can be done is to prevent the feature for detecting code blocks from running on iOS below v12

2 Likes

Ahh, that’s a pity. Well, it can’t be helped. I’ll update my devices in the near future then.

Another thing that can be done is to prevent the feature for detecting code blocks from running on iOS below v12

I actually don’t know how I would do that. I could look this up, but updating my device seems to be the better approach.

Thank you so much for taking the time to help me and solve this problem in such speed. I am very grateful.
Good luck and have a joyful, healty time!

1 Like

This is something that we are going to ship with the next release on July 16th

2 Likes