Realm-cocoa: error: module importing failed: invalid token (rlm_lldb.py, line 37) File "temp.py", line 1, in <module>

Created on 28 Nov 2019  Â·  8Comments  Â·  Source: realm/realm-cocoa

!!! MANDATORY TO FILL OUT !!!

Goals


I want to get Realm to stop causing import errors that crash my app on certain devices.

Expected Results


I removed Realm two years ago. I expected it to be gone. I haven't had issues until Xcode 11.

Actual Results


For EVERY APP, Xcode is showing this error when the app is run, it it crashes the apps on certain devices because of the error:
error: module importing failed: invalid token (rlm_lldb.py, line 37) File "temp.py", line 1, in

Steps to Reproduce


I have no idea how to reproduce this error. Please help!

Code Sample

Version of Realm and Tooling


Realm framework version: none (removed)

Realm Object Server version: none

Xcode version: 11.2.1

iOS/OSX version: OS 10.15.1

Dependency manager + version: must have used CocoaPods to install Realm two years ago; don't use CocoaPods anymore either; use Carthage now but not related to Realm or CocoaPods

O-Community

All 8 comments

Hi @inPhilly, sorry to hear you have trouble with this. I've never heard of anything like this. But a quick search shows that this is related to our xcode plugin. Perhaps you can try search for the file so you can get the plugin uninstalled. It might be in ~/.lldbinit ?

I have no idea what .lldbinit is or how to access it. I'm sorry. Can you be more specific? Is this something I should be doing in the Terminal?

I have these files:

~Library/Application Support/Realm/rlm_lldb.py
~Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin

But I have no idea how to properly remove this plugin so as to stop the error. When I simply delete everything I get the following error:
error: module importing failed: invalid pathname

I'm pretty sure it has to do with this file:
~Library/Application Support/Realm/rlm_lldb.py
since when I just deleted
~Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin
via
cd ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
rm -r RealmPlugin.xcplugin
I still get this error:
error: module importing failed: invalid token (rlm_lldb.py, line 37) File "temp.py", line 1, in <module>
But when I change the name of
~Library/Application Support/Realm/rlm_lldb.py
(I am afraid to delete it). I am left with this error:
error: module importing failed: invalid pathname

This is my question for this on StackOverflow. Can you look at this and tell me if I did the right thing?

https://stackoverflow.com/questions/59090655/removed-realm-but-still-getting-this-error-module-importing-failed-invalid-to

Basically, if you don't want to open the link, it says: I found my way to the editor for lldbinit, highlighted the offending line,

command script import "~/Library/Application Support/Realm/rlm_lldb.py" --allow$

removed the text, and exited, choosing to save upon exit. This made the error go away.

I am just so nervous because I have no idea what I'm doing in this editor or what it can affect. Should I have removed the whole line, including the -allow$ at the end? (I did). Should I have deleted all the blank space left in the file? (I left it). Is it okay that there is nothing left in that file but blank space?

Did I setup that file manually? Otherwise, could it somehow get setup again?

Any help you can give would be greatly appreciated. Thank you so much!

Happy to hear you got your problem fixed. You did fine in removing the whole line. You shouldn't expect the line to reappear by itself. Xcode no longer supports plugins like this.

➤ Unito Sync Bot commented:

Transition made by Unito

Thank you!

Was this page helpful?
0 / 5 - 0 ratings