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

Xcode 16 iOS 18 crashes on Parse initialization #1809

Closed
NDDev19 opened this issue Sep 18, 2024 · 11 comments
Closed

Xcode 16 iOS 18 crashes on Parse initialization #1809

NDDev19 opened this issue Sep 18, 2024 · 11 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@NDDev19
Copy link

NDDev19 commented Sep 18, 2024

Issue Description

App crashes on launch when Parse is initializing.

Steps to reproduce

Create an empty app and just try to call

let parseConfig = ParseClientConfiguration {
            $0.applicationId = "id"
            $0.clientKey = "key"
            $0.server = "server address"
        }
        Parse.initialize(with: parseConfig)

Actual Outcome

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid class name. Class names cannot start with an underscore.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001804b70ec __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x000000018008ede8 objc_exception_throw + 72
	2   CoreFoundation                      0x00000001804b6ffc -[NSException initWithCoder:] + 0
	3   ParseTraining.debug.dylib           0x000000010177b038 +[PFObject(Private) _assertValidInstanceClassName:] + 244
	4   ParseTraining.debug.dylib           0x00000001017844f0 -[PFObject init] + 512
	5   ParseTraining.debug.dylib           0x0000000101784824 -[PFObject initWithObjectState:] + 108
	6   ParseTraining.debug.dylib           0x0000000101784984 +[PFObject objectWithClassName:objectId:completeData:] + 292
	7   ParseTraining.debug.dylib           0x0000000101784ad0 +[PFObject objectWithClassName:] + 96
	8   ParseTraining.debug.dylib           0x0000000101785080 +[PFObject object] + 308
	9   ParseTraining.debug.dylib           0x00000001016e43cc __56-[PFCurrentInstallationController getCurrentObjectAsync]_block_invoke.9 + 580
	10  ParseTraining.debug.dylib           0x00000001017b8c88 __62-[BFTask continueWithExecutor:successBlock:cancellationToken:]_block_invoke + 212
	11  ParseTraining.debug.dylib           0x00000001017b8324 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke + 124
	12  ParseTraining.debug.dylib           0x00000001017b46e0 __29+[BFExecutor defaultExecutor]_block_invoke_2 + 196
	13  ParseTraining.debug.dylib           0x00000001017b50a4 -[BFExecutor execute:] + 104
	14  ParseTraining.debug.dylib           0x00000001017b8788 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke.15 + 60
	15  ParseTraining.debug.dylib           0x00000001017b7d5c -[BFTask runContinuations] + 544
	16  ParseTraining.debug.dylib           0x00000001017b768c -[BFTask trySetResult:] + 252
	17  ParseTraining.debug.dylib           0x00000001017b9964 -[BFTaskCompletionSource trySetResult:] + 104
	18  ParseTraining.debug.dylib           0x000000010171d2ec __28-[PFAsyncTaskQueue enqueue:]_block_invoke_2 + 280
	19  ParseTraining.debug.dylib           0x00000001017b8324 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke + 124
	20  libdispatch.dylib                   0x00000001008acec0 _dispatch_call_block_and_release + 24
	21  libdispatch.dylib                   0x00000001008ae7b8 _dispatch_client_callout + 16
	22  libdispatch.dylib                   0x00000001008b15f4 _dispatch_queue_override_invoke + 1312
	23  libdispatch.dylib                   0x00000001008c23d4 _dispatch_root_queue_drain + 372
	24  libdispatch.dylib                   0x00000001008c2f7c _dispatch_worker_thread2 + 256
	25  libsystem_pthread.dylib             0x0000000100c4bb38 _pthread_wqthread + 224
	26  libsystem_pthread.dylib             0x0000000100c4a934 start_wqthread + 8
)
libc++abi: terminating due to uncaught exception of type NSException

Environment

Xcode 16
iOS 18
Parse-Server version 7.2

Client

  • Parse ObjC SDK version: 4.1.1

Server

  • Parse Server version: 7.2
  • Operating system: Ubuntu 24.04.1 LTS
  • Local or remote host: VPS

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 7.0.14
  • Local or remote host: VPS

Logs

Empty

Copy link

Thanks for opening this issue!

@junya100
Copy link

Same here.

@fantasticrahulrai
Copy link

same here

@Satyam-Tripathi-89
Copy link

Same here

@fantasticrahulrai
Copy link

The easiest fix..for me was move back to Cocoapods from SPM and change the imports from ParseCore to Parse..

@NDDev19
Copy link
Author

NDDev19 commented Sep 22, 2024

The easiest fix..for me was move back to Cocoapods from SPM and change the imports from ParseCore to Parse..

Using CocoaPods seems to work.

@dhoerl
Copy link

dhoerl commented Sep 23, 2024

This issue appears related to #1792, for which a PR exists.

@idefen1
Copy link

idefen1 commented Sep 23, 2024

Edit: Thank you @dhoerl !!!!!!! By simply adding the following, all is working for me:

PFInstallation.registerSubclass()
PFUser.registerSubclass()
PFSession.registerSubclass()

Original:
Having same issue as OP however cannot find work around. Any help would be greatly appreciated. @NDDev19 can you please give details of CocoaPods fix? I use CocoaPods but cannot find resolution. Thank you.

@NDDev19
Copy link
Author

NDDev19 commented Sep 24, 2024

Edit: Thank you @dhoerl !!!!!!! By simply adding the following, all is working for me:

PFInstallation.registerSubclass()
PFUser.registerSubclass()
PFSession.registerSubclass()

Original: Having same issue as OP however cannot find work around. Any help would be greatly appreciated. @NDDev19 can you please give details of CocoaPods fix? I use CocoaPods but cannot find resolution. Thank you.

When adding Parse-SDK using Swift Package Manager use this commit d2b9580db7ce44d6d4d0f626d5e388901f81f5ed instead of the latest 4.1.1 version.

@dhoerl
Copy link

dhoerl commented Sep 24, 2024

I switched to the commit above, finally launched. I removed all the registerSubClass() calls, still launched. So that commit solves all issues for me! Thank you @NDDev19 !!!

@mtrezza
Copy link
Member

mtrezza commented Sep 25, 2024

Can this be closed as duplicate of #1792?

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Sep 25, 2024
@NDDev19 NDDev19 closed this as completed Sep 25, 2024
@NDDev19 NDDev19 reopened this Sep 25, 2024
@NDDev19 NDDev19 closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

7 participants