Apple芯片Mac上IntelliJ崩溃,日志提示Operation Not Permitted
解决Mac上IntelliJ社区版崩溃(Operation Not Permitted)问题
问题详情
首次在Mac上配置IntelliJ社区版,执行特定操作时发生崩溃,日志中出现Operation not permitted错误,涉及系统路径/Users/<user>/Library/Application Support/com.apple.LaunchServicesTemplateApp.dv。
重现步骤
- 创建项目
- 按下
Command+Shift+A打开动作对话框,输入内容时触发崩溃
相关日志记录
023-12-21 12:07:59,693 [ 35152] WARN - #c.i.o.v.i.l.LocalFileSystemBase - /User/<user>/Library/Application Support/com.apple.LaunchServicesTemplateApp.dv: Operation not permitted java.nio.file.FileSystemException: /Users/<user>/Library/Application Support/com.apple.LaunchServicesTemplateApp.dv: Operation not permitted at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148) at java.base/java.nio.file.Files.readAttributes(Files.java:1851) at com.intellij.openapi.util.io.NioFiles.readAttributes(NioFiles.java:187) at com.intellij.util.io.PlatformNioHelper.visitDirectory(PlatformNioHelper.java:54) at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.listWithAttributes(LocalFileSystemImpl.java:307) at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.lambda$new$0(LocalFileSystemImpl.java:49) at com.intellij.openapi.vfs.DiskQueryRelay.accessDiskWithCheckCanceled(DiskQueryRelay.java:45) at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.listWithCaching(LocalFileSystemImpl.java:274) at com.intellij.openapi.vfs.newvfs.RefreshWorker.partialDirRefresh(RefreshWorker.java:322) at com.intellij.openapi.vfs.newvfs.RefreshWorker.processQueue(RefreshWorker.java:186) at com.intellij.openapi.vfs.newvfs.RefreshWorker.lambda$parallelScan$0(RefreshWorker.java:122) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
解决建议
- 检查应用权限:打开系统偏好设置→安全性与隐私→隐私→文件和文件夹,确认IntelliJ被授予访问用户Library文件夹的权限。若未授权,点击左下角锁图标解锁,添加IntelliJ应用程序。
- 修复目录权限:打开终端,执行以下命令修复用户Library目录的权限:
sudo chown -R $USER:$GROUP ~/Library sudo chmod -R u+rw ~/Library - 排除敏感目录:在IntelliJ中设置忽略触发错误的路径:打开
Settings/Preferences→Appearance & Behavior→System Settings→Directories,点击+按钮将/Users/<user>/Library/Application Support/com.apple.LaunchServicesTemplateApp.dv添加到Excluded Directories列表。 - 重置缓存:删除IntelliJ缓存目录(路径一般为
~/Library/Caches/JetBrains/IntelliJIdea<版本号>),之后重启IntelliJ。 - 重新安装应用:若以上方法无效,卸载当前IntelliJ版本,从官方渠道下载最新社区版,安装时确保将应用拖动到「应用程序」文件夹中,避免权限异常。
内容的提问来源于stack exchange,提问作者Siva
相关产品推荐
相关产品推荐

