-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cannot run the app to Pi 4B #22
Comments
@EnziinSystem Thanks for opening this issue I can see this line in the error text Is the pubspec.yaml file missing from the root of your project? |
I use Windows for development and deploy to a Pi-4 or Pi-5. So my project on Windows works on Windows itself and Android, iOS and of course, it has a pubspec.yaml file in the root directory. This error only appears on Pi-4B and not on other platforms. It seems to be related to the process of copying files from Windows to Pi-4 |
Yes you are right that's the problem Can you tell me which version of the snapp_cli do you use? |
Also, Can you check that you can use passwordless ssh connection? I mean, you should be able to connect to your raspberry with this simple command without entering the password
example |
I still connect SSH via authorized_keys without a password.
On the Pi-4B I installed snap_installer and tested without any errors. More importantly, I was able to run an application developed on Windows, connected to Pi4B with full hot-reload. However, later times it cannot be done anymore. Or in short, I did it once. |
This is very strange. If it's possible for you, I would suggest to set time and try to debug it together. |
I agree with your suggestion, you can even use Teamviewer to access my computer directly. |
Hi any news related to this issue? after execute Unfortunately I have the following errors. Building Linux application... kind regards |
I think you issue is related to your flutter SDK version Make sure that you have the same version of the flutter both on your Host and your remote. |
Thanks for quick reply. I will check it 👍🏻 |
I checked flutter version on both Pi-5 and PC On Pi-5 (and Pi-4B)
On PC
For detail, run snapp_cli in Verbose mode
Run an app demo from PC deploy to Pi-5
List root path project
The problem is unsolved. |
I check the flutter versions on host and pi. On pi it was 3.19.6 and on host 3.19.4. After update to same version no more issues. 👍🏻 |
Steps that create this problem: Step 1: Create a new project by VS Code Step 2: Add window_manager plugin to pubspec.yaml
VS Code automation run flutter pub get plugins Step 3: Run deploy to Pi-5
However, the application can still compile and run on Windows. The reason is the window_manager plugin, but I don't have the ability to find out specifically. Update: I found that any project that uses standard packages other than the counter basic app when creating a new project causes the above error. This example uses the Bloc package, a common design pattern, which also causes an error:
|
I could try to test this scenario with macOS for now. Snapp cli is working perfectly even if you have added some plugins Example: import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Must add this line.
await windowManager.ensureInitialized();
WindowOptions windowOptions = const WindowOptions(
size: Size(800, 600),
center: true,
backgroundColor: Colors.transparent,
skipTaskbar: false,
titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
|
I will also try to reproduce this in windows and linux. But probably your problem is related to file/folder access permission. Can you try to reproduce this with root user? |
I will close this issue for now Feel free to reopen it if you had the same problem |
I can list devices
However, it cannot run an application to Pi 4 on debug mode
The text was updated successfully, but these errors were encountered: