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

App not running in Macos #1

Open
prabhuc94 opened this issue Jan 5, 2024 · 7 comments
Open

App not running in Macos #1

prabhuc94 opened this issue Jan 5, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@prabhuc94
Copy link

No description provided.

@otmi100
Copy link

otmi100 commented Apr 3, 2024

I can confirm this. There is an exception when running isFirstInstance() for release-builds:

PathNotFoundException: PathNotFoundException: Cannot open file, path = '/Users/myuser/Library/Caches//Users/myuser/development/myapp/build/macos/Build/Products/Release/myapp.app/Contents/MacOS/myapp.pid' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:381)
<asynchronous suspension>
#2      _File.writeAsBytes.<anonymous closure> (dart:io/file_impl.dart:634)
<asynchronous suspension>
#3      FlutterSingleInstanceBase._activateFirstInstance (package:flutter_single_instance/flutter_single_instance_base.dart:56)
<asynchronous suspension>
#4      FlutterSingleInstanceBase.isFirstInstance (package:flutter_single_instance/flutter_single_instance_base.dart:45)

[✓] Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale de-DE)
• Flutter version 3.19.3 on channel stable at /Users/myuser/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ba39319843 (4 weeks ago), 2024-03-07 15:22:21 -0600
• Engine revision 2e4ba9c6fb
• Dart version 3.3.1
• DevTools version 2.31.1

@mcquenji
Copy link
Contributor

mcquenji commented Jan 1, 2025

hmm interesting - will investigate

@mcquenji mcquenji self-assigned this Jan 1, 2025
@mcquenji mcquenji added the bug Something isn't working label Jan 1, 2025
@mcquenji
Copy link
Contributor

mcquenji commented Jan 1, 2025

Could you please share your app entitlements? (macos/Runner/Release.entitlements)

@otmi100
Copy link

otmi100 commented Jan 3, 2025

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<false/>
</dict>
</plist>

@mcquenji
Copy link
Contributor

mcquenji commented Jan 3, 2025

hmm and its still not working?

Sadly i dont have a mac - so i cant test :(

@mcquenji
Copy link
Contributor

mcquenji commented Jan 3, 2025

do you have the same entitlements for debug mode?

@mcquenji
Copy link
Contributor

mcquenji commented Jan 3, 2025

I've pushed a potential fix to the repo could you try if it resolves the issue with a dependency override?

dependency_overrides:
  flutter_single_instance:
    git:
      url: https://github.com/necodeIT/flutter_single_instance.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants