IJPL-172106 Warn macOS 15 users about potential issues with OS firewall, suggest workarounds

(cherry picked from commit 575c949fe262c28d7ae3debe2e6a3e1279999762)

IJ-CR-150531

GitOrigin-RevId: f8f23ce7ac2cad232241e79d1da383e889b1706b
This commit is contained in:
Alexander Lobas
2024-11-29 15:15:19 +01:00
committed by intellij-monorepo-bot
parent 1e56ff834c
commit 6ac534ae65
5 changed files with 56 additions and 8 deletions

View File

@@ -40,8 +40,8 @@ inotify.instance.limit=The <b>inotify</b>(7) instances limit reached. <a href="h
inotify.watch.limit=The current <b>inotify</b>(7) watch limit is too low. <a href="https://intellij.com/inotify-watches">More details.</a>
file.synchronize.progress=Synchronizing files
async.events.progress=Processing file events
file.synchronize.progress=Synchronizing files\u2026
async.events.progress=Processing file events\u2026
progress.title.doing.file.refresh.0=Doing file refresh. {0}
filetype.idea.workspace.description=IDEA workspace
@@ -55,15 +55,15 @@ error.connection.failed.status=Request failed with status code {0}
cannot.load.remote.file=Cannot load ''{0}'': {1}
cannot.create.local.file=Cannot create local file: {0}
download.progress.connecting=Connecting to ''{0}''
download.progress.downloading=Downloading ''{0}''
download.progress.connecting=Connecting to ''{0}''\u2026
download.progress.downloading=Downloading ''{0}''\u2026
vfs.file.not.exist.error=''{0}'' does not exist in VFS
vfs.target.already.exists.error=''{0}'' already exists in VFS
vfs.target.not.directory.error=''{0}'' is not a directory in VFS
cannot.delete.root.directory=Cannot delete root directory ''{0}''
progress.title.file.system.synchronization=File system synchronization
progress.text.processing.detected.file.changes=Processing {0} detected file {0,choice,1#change|2#changes}
progress.text.processing.detected.file.changes=Processing {0} detected file {0,choice,1#change|2#changes}\u2026
macro.module.file.directory=The directory of the module file
macro.module.file.path=The path to the module file
@@ -146,9 +146,9 @@ proxy.old.way.label=<html>You have JVM property <tt>{0}</tt> set to <tt>{1}</tt>
progress.download.0.title=Downloading {0}
progress.download.file.text=Downloading ''{0}'' from ''{1}''
progress.connecting.to.download.file.text=Connecting to ''{0}''
progress.downloading.0.files.text=Downloading {0} {0, choice, 1#file|2#files}
progress.download.file.text=Downloading ''{0}'' from ''{1}''\u2026
progress.connecting.to.download.file.text=Connecting to ''{0}''\u2026
progress.downloading.0.files.text=Downloading {0} {0, choice, 1#file|2#files}\u2026
dialog.directory.for.downloaded.files.title=Download Directory
dialog.directory.for.downloaded.files.description=Downloaded files will be copied to selected directory
error.file.download.failed=Failed to download ''{0}'':\n{1}
@@ -159,3 +159,9 @@ unknown.error=Unknown error
dialog.message.enter.password=Enter password:
dialog.title.password=Password
displays.a.password.input.dialog=Displays a password input dialog
mac15.local.network.issue.title=MacOS X 15 Local Network Issue
mac15.local.network.issue.message=java.net.NoRouteToHostException: No route to host<br><br>See <a href="https://youtrack.jetbrains.com/articles/SUPPORT-A-564/Cannot-connect-to-remote-host-No-route-to-host-macOS-15-Sequoia">SUPPORT-A-564</a> for a possible solution.
mac15.local.network.issue.full.message=Cannot connect to remote host: java.net.NoRouteToHostException: No route to host<br>See <a href="https://youtrack.jetbrains.com/articles/SUPPORT-A-564/Cannot-connect-to-remote-host-No-route-to-host-macOS-15-Sequoia">SUPPORT-A-564</a> for a possible solution.
mac15.local.network.issue.notification.message=Cannot connect to remote host: java.net.NoRouteToHostException
mac15.local.network.issue.notification.button=Open Solution

View File

@@ -0,0 +1,39 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.util.io
import com.intellij.ide.IdeCoreBundle
import com.intellij.notification.BrowseNotificationAction
import com.intellij.notification.Notification
import com.intellij.notification.NotificationType
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.SystemInfo
import org.jetbrains.annotations.ApiStatus.Internal
import org.jetbrains.annotations.Nls
import java.net.NoRouteToHostException
/**
* @author Alexander Lobas
*/
@Internal
object NetUtils {
private const val URL = "https://youtrack.jetbrains.com/articles/SUPPORT-A-564/Cannot-connect-to-remote-host-No-route-to-host-macOS-15-Sequoia"
fun getNetworkErrorSolutionMessage(error: Throwable, full: Boolean): @Nls String? {
if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) {
return IdeCoreBundle.message(if (full) "mac15.local.network.issue.full.message" else "mac15.local.network.issue.message")
}
return null
}
@Suppress("DialogTitleCapitalization")
fun showNetworkErrorSolutionNotification(error: Throwable, project: Project?) {
if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) {
Notification("Mac15 Local Network",
IdeCoreBundle.message("mac15.local.network.issue.title"),
IdeCoreBundle.message("mac15.local.network.issue.notification.message"),
NotificationType.INFORMATION)
.addAction(BrowseNotificationAction(IdeCoreBundle.message("mac15.local.network.issue.notification.button"), URL))
.notify(project)
}
}
}

View File

@@ -1579,6 +1579,7 @@
key="notification.group.failed.to.generate.module.descriptors"/>
<notificationGroup id="Ultimate Installed" displayType="BALLOON" bundle="messages.IdeBundle"
key="notification.group.advertiser.try.ultimate.installed"/>
<notificationGroup id="Mac15 Local Network" displayType="BALLOON" bundle="messages.IdeCoreBundle" key="mac15.local.network.issue.title"/>
<defaultHighlightingSettingProvider implementation="com.intellij.codeInsight.actions.ReaderModeHighlightingSettingsProvider"/>
<registryKey key="html.editor.timeout" defaultValue="15000" description="HTML editor content loading timeout, ms"/>

View File

@@ -967,6 +967,7 @@ f:com.intellij.openapi.util.SystemInfo
- sf:isMacOSCatalina:Z
- sf:isMacOSLeopard:Z
- sf:isMacOSMonterey:Z
- sf:isMacOSSequoia:Z
- sf:isMacOSSonoma:Z
- sf:isMacOSVentura:Z
- sf:isMacSystemMenu:Z

View File

@@ -104,6 +104,7 @@ public final class SystemInfo {
public static final boolean isMacOSMonterey = isMac && isOsVersionAtLeast("12.0");
public static final boolean isMacOSVentura = isMac && isOsVersionAtLeast("13.0");
public static final boolean isMacOSSonoma = isMac && isOsVersionAtLeast("14.0");
public static final boolean isMacOSSequoia = isMac && isOsVersionAtLeast("15.0");
/**
* Build number is the only more or less stable approach to get comparable Windows versions.