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

No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file #27

Open
hintofbasil opened this issue Aug 6, 2020 · 4 comments

Comments

@hintofbasil
Copy link

Describe the bug
I am getting intermittent errors from the application failing to connect to my Github server. These errors come in the form of notifications. Checking the logs they contain 2020-08-06 09:46:25 ERROR Failed to connect to https://REDACTED/api/v3/notifications.
I have never successfully received a proper notification. Inspecting further I was am getting the failed to connect notification only when there is a new notification.

Running the tool manually I get no output and a response code of 0 when there are no notification updates. But when there is a notification update I get the error 2020-08-06 15:39:28.419 terminal-notifier[16497:137323] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting.

To Reproduce
Steps to reproduce the behavior:

  1. Trigger a notification
  2. Run /usr/local/lib/github_notif before the tool runs automatically.

Expected behavior
I expected to see details of the notification

Screenshots
N/A

Desktop (please complete the following information):

  • OSX version: 10.14.6 (18G103)

Additional context
N/A

@sargsyan
Copy link
Owner

sargsyan commented Sep 9, 2020

@hintofbasil sorry for the late reply. Seems that "Failed to connect to https://REDACTED/api/v3/notifications" is a misleading error message and the real issue is the terminal-notifier binary. Could you try to call terminal-notifier from your terminal?

An example:

terminal-notifier -message hey

@hintofbasil
Copy link
Author

terminal-notifier -message hey works fine. Notification appears with the correct message.

@sargsyan
Copy link
Owner

sargsyan commented Sep 9, 2020

Ok, then let's look at the first problem. Could you open the file /usr/local/Cellar/github-notifier/<current_version:the latest is 1.0.7>/lib/github_notif and replace the following code

    if [[ "$config_name" == "https://github.com" ]]; then
      notifications_api_url="${config_name/https:\/\//https://api.}"/notifications
    else
      notifications_api_url="${config_name}/api/v3/notifications"
    fi

with the following?

    notifications_api_url="${config_name/https:\/\//https://api.}"/notifications

Unfortunately, I don't have access to a GitHub enterprise account to test it myself.

@hintofbasil
Copy link
Author

Apologies for the slow response here.

I've tried making the above changes. This results in 2020-10-06 22:25:27 ERROR Failed to connect to https://api.REDACTED/notifications when running the application.

I've checked the two endpoints and /api/v3/notification is definitely correct for the Github version we are using 2.20.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants