periphery icon indicating copy to clipboard operation
periphery copied to clipboard

Error when run periphery scan

Open arthopar opened this issue 3 years ago • 5 comments

Environment: Xcode 14 RC DerivedData data path: /Users/username/Library/Developer/Xcode/DerivedData MacBook Pro M1 Max

I didn't get the same issue on my old mac in case scanning the same project.

Error:

  • Inspecting project...
  • Building Zero...
  • Indexing... error: (IndexStoreError) internalError("index store path does not exist: /Users/user/Library/Caches/com.github.peripheryapp/DerivedData-7c902665-7c902665/Index/DataStore")

arthopar avatar Sep 09 '22 08:09 arthopar

I have the same issue on my M1 Pro after updating Xcode to 14.0 today.

joliejuly avatar Sep 13 '22 17:09 joliejuly

Same here; the Index/DataStore path seems to have been removed from derived data's created in xcode14

alextudge avatar Sep 14 '22 14:09 alextudge

Looks like Apple decided to add the .noindex extension to the Index folder within the DerivedData so it doesn't show up in Finder searches.

Would be fixed after this is merged: https://github.com/peripheryapp/periphery/pull/523

jortberends avatar Sep 15 '22 09:09 jortberends

The index store at '/Users/shikisuen/Library/Caches/com.github.peripheryapp/DerivedData-81888ae0-fc2689f0/Index.noindex/DataStore' does not contain the data...

This is the error generated while using the periphery built from the commit bf256b9 .

ShikiSuen avatar Sep 18 '22 13:09 ShikiSuen

Looks like Apple decided to add the .noindex extension to the Index folder within the DerivedData so it doesn't show up in Finder searches.

Would be fixed after this is merged: #523

Now merged, now let's hope a new build will be released soon

adarhef avatar Sep 20 '22 11:09 adarhef

Well, if you're a little impatient (like I am), you can do this in the DerivedData folder:

rm -rf Index
ln -s Index.noindex Index

This tricks periphery 2.9.0 into working with Xcode 14. Not ideal but a temporary fix for the issue.

tatewake avatar Sep 25 '22 07:09 tatewake

@tatewake does that workaround work with xcode integration or just when calling periphery from command line?

gsbernstein avatar Sep 27 '22 00:09 gsbernstein

Should work regardless of how you installed periphery.

tatewake avatar Sep 27 '22 02:09 tatewake

Wasn't working but someone left a comment (now deleted) indicating I should run it inside the project folder, not just at the root of DerivedData 🤦 also in my case the path was ~/Library/Caches/com.github.peripheryapp/DerivedData-*. Works now, thanks!

gsbernstein avatar Sep 30 '22 05:09 gsbernstein

Still does not work for me. Could you post full solution @gsbernstein ? 🙏

krzys-bfi avatar Oct 03 '22 12:10 krzys-bfi

@krzys-bfi Try cd-ing into the folder where you get the error (for me it was /Users/user/Library/Caches/com.github.peripheryapp/DerivedData-xxxxxx-xxxx) and run the commands from @tatewake 's comment . Worked for me

yegorsch avatar Oct 04 '22 12:10 yegorsch

Worked for me, thanks @tatewake

Arideno avatar Oct 04 '22 20:10 Arideno

This is now fixed in v2.10.0.

ileitch avatar Oct 10 '22 08:10 ileitch

Hi, I am using currently v2.10.0 but I still face the same issue.

emanuelcaesar avatar Nov 17 '22 09:11 emanuelcaesar

And I can't install / upgrade to 2.10.0, the latest on brew seems to be 2.8.1

micHar avatar Nov 17 '22 10:11 micHar

@emanuelcaesar Can you please provide the path that Periphery is attempting to load (from the error message) and the correct location of the index store?

@micHar What command are you running to update? The latest version is defined here: https://github.com/peripheryapp/homebrew-periphery/blob/master/Casks/periphery.rb

ileitch avatar Nov 19 '22 11:11 ileitch

DerivedData dirs are now keyed with the Xcode version hash in 2.10.3, so this should now be resolved.

ileitch avatar Jan 02 '23 17:01 ileitch

I still have this issue on my project with Apple Watch support. The Datastore is there in the correct folder, but I still get Source file not indexed on my project files.

MrJre avatar Jan 30 '23 10:01 MrJre

@ileitch can we reopen this issue? seems we're still having the derived data index problem:

.periphery.yml

retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace

➜ TestApp git:(develop) ✗ periphery scan --verbose

[version] 2.12.0
[shell] /bin/zsh -lc env
[shell] /usr/bin/env swift -version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: x86_64-apple-macosx12.0
[shell] /usr/bin/env xcodebuild -version
Xcode 14.2
Build version 14C18
[configuration:begin]
retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace
[configuration:end]
* Inspecting project...
[xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace
[xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj
[xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json
* Building TestApp...
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test
[shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf"
* Indexing...
error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729  

➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist

cozcelikmobiquity avatar Feb 02 '23 14:02 cozcelikmobiquity

@ileitch can we reopen this issue? seems we're still having the derived data index problem:

.periphery.yml

retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace

➜ TestApp git:(develop) ✗ periphery scan --verbose

[version] 2.12.0
[shell] /bin/zsh -lc env
[shell] /usr/bin/env swift -version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: x86_64-apple-macosx12.0
[shell] /usr/bin/env xcodebuild -version
Xcode 14.2
Build version 14C18
[configuration:begin]
retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace
[configuration:end]
* Inspecting project...
[xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace
[xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj
[xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json
* Building TestApp...
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test
[shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf"
* Indexing...
error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729  

➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist

Same issue with Xcode 14.2 (14C18).

ZeroOnet avatar Feb 14 '23 05:02 ZeroOnet

@ileitch can we reopen this issue? seems we're still having the derived data index problem: .periphery.yml

retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace

➜ TestApp git:(develop) ✗ periphery scan --verbose

[version] 2.12.0
[shell] /bin/zsh -lc env
[shell] /usr/bin/env swift -version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: x86_64-apple-macosx12.0
[shell] /usr/bin/env xcodebuild -version
Xcode 14.2
Build version 14C18
[configuration:begin]
retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace
[configuration:end]
* Inspecting project...
[xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace
[xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj
[xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json
* Building TestApp...
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test
[shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf"
* Indexing...
error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729  

➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist

Same issue with Xcode 14.2 (14C18). If I added --clean-build option, it will be fixed but need more build time.

ZeroOnet avatar Feb 14 '23 05:02 ZeroOnet

rm -rf Index ln -s Index.noindex Index

What needs to be done in order to und these changes?

dvilceanu-ae avatar Mar 02 '23 12:03 dvilceanu-ae

rm -rf Index ln -s Index.noindex Index

What needs to be done in order to und these changes?

You can just delete the symbolic link it created. Or if derived data ever gets in a weird state, you can delete the whole directory and it will regenerate.

gsbernstein avatar Mar 09 '23 17:03 gsbernstein

@ZeroOnet Your error is different than the original, you appear to be missing the Index directory entirely, which is very odd. Do you have COMPILER_INDEX_STORE_ENABLE disabled? I think some CI services disable it by default.

ileitch avatar Mar 10 '23 12:03 ileitch