parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

iOS SDK - The class PFUser must be registered with registerSubclass before using Parse

Open frankeno opened this issue 8 years ago • 7 comments

Hello, I'm using Parse Server hosted on back4app, and it's been half an hour that I'm getting this error in my iOS app:

2018-06-14 12:18:04.955801+0200 Pikky[6867:3655616] [DYMTLInitPlatform] platform initialization successful
2018-06-14 12:18:05.097792+0200 Pikky[6867:3655503] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The class PFUser must be registered with registerSubclass before using Parse.'
*** First throw call stack:
(0x18406ad8c 0x1832245ec 0x18406ac6c 0x102c4bad4 0x102c4a480 0x102a03774 0x102a00f68 0x102a0c1dc 0x102a0c368 0x18e2e9fec 0x18e44b738 0x18e44b8b0 0x18e44b470 0x18e119294 0x18e12d994 0x18e44b738 0x18e44b8b0 0x18e44b470 0x18e119294 0x18e14749c 0x18e44b738 0x18e44b470 0x18e2e9c94 0x18e44b738 0x18e44b8b0 0x18e44b470 0x18e2e8fe4 0x18e5f5e98 0x18e057fa4 0x18dc751d8 0x18dc434d4 0x18e273b1c 0x18dc42dd0 0x18dc42c6c 0x18dc41afc 0x18e8d784c 0x18dc411ec 0x18e6bcac8 0x18e80abf8 0x18dc40c0c 0x18dc405a8 0x18dc3d5e0 0x18dc3d330 0x18686b470 0x186873d6c 0x10404919c 0x1040557cc 0x18689f878 0x18689f51c 0x18689fab8 0x184013404 0x184012c2c 0x18401079c 0x183f30da8 0x185f15020 0x18df4d758 0x1029fca6c 0x1839c1fc0)
libc++abi.dylib: terminating with uncaught exception of type NSException

I haven't changed the code nor updated the Parse.framework, what can cause this issue? It was working fine until a while ago...

frankeno avatar Jun 14 '18 10:06 frankeno

What's the Parse.framework version that you are using?

In very old version such as Parse-SDK-iOS-OSX 1.14.3, you need to registerSubclass. This is no longer required now.

nebitrams avatar Jun 26 '18 16:06 nebitrams

i’ve fixed the issue by instantiating: var user = PFUser(className: “_User”)

frankeno avatar Jun 26 '18 17:06 frankeno

@xscoder1 I've never run into this issue. You shouldn't have to register a subclass like that. You should probably double check your version and use the latest without calling registerSubclass that way.

JacobJT avatar Jun 26 '18 22:06 JacobJT

I have the same issue and I'm using the latest Using Parse (1.17.1)

2018-09-08 17:16:39.661208-0700 Astrid[12056:4145891] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The class PFUser must be registered with registerSubclass before using Parse.'

kangaroo5383 avatar Sep 09 '18 00:09 kangaroo5383

@kangaroo5383 did you call registerSubclass ? I’ll close as we’ll likely not fix auto registration for Swift subclasses

flovilmart avatar Sep 09 '18 00:09 flovilmart

Having same issue

DolenzSong avatar Oct 12 '18 16:10 DolenzSong

@DolenzSong have you tried using: ‘var user = PFUser(className: “_User”)’?

frankeno avatar Oct 12 '18 19:10 frankeno