-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
dropzone view: targetplatform.windows is not supported #61
Comments
Could you come up with a reproducible repo? |
what do you mean by reproducible repo? |
A very small project, a minimal one, that shows the problem and allows me to reproduce it. Because, as things stand now, I can't make that error appear myself, so I have no idea what leads to it and how I can fix it. |
@deakjahn , here is the sample project link. please download it and make it live on server. because we are getting target platform error on our live server. in local it's working fine. our app is developed for Android, IOS, and web. but this we allowing this feature is only for web . please make it supported for Window and MacOs as well. I think it might be creating problem because this library is not supporting Windows and MacOs. https://drive.google.com/file/d/1644K50Sx_-imnKUYcEyqlJTj58xHXkCx/view?usp=sharing |
@deakjahn We are working on a social media website called Werfie (https://werfie.com) which is similar to Twitter. We would love to dropzone developed by you in werfie. You will get credit for it as well in our website Credits section. I request you to please update us with the issue that we are facing while using dropzone in our website. We are expecting to launch the new version of werfie.com on Monday next week and this issue is holding the release. I request your immediate attention on this. |
@Asad0473 Then please, help me what to look for :-) I downloaded it, put it into Android Studio and built for the web. I uploaded it to my test site, temporarily at http://teszt.tramontana-teszt.hu/#/. When I start it, it starts, when I drag an image into it, it appears. I'm testing in Vivaldi, a Chrome based browser but I also tried Edge to be sure. |
Its not working on my website |
But does my test at the link above work for you, in your browser? |
sorry its working fine in my browser |
but its not work for https://werfie.com/ .. |
Maybe its not working for secure website |
I don't think so but I can add a cert to my test in a few minutes. In the meantime, could you do the same as I did? I built your sample simply with:
or
and upload the contents of |
It's HTTPS now: https://teszt.tramontana-teszt.hu/#/ |
Ok i test it |
I don't really know where you plan to use it on the site. In the dialog to send a post? |
yes in dialog to post |
Right now I get a window showing the image and the browser has CORS error messages. But nothing about Windows... |
https://staging.werfie.com/ use this link and you see the error in post dialog |
I tried with the real one, with a disposable e-mail, but didn't send any message. :-) I'll try to register the same here. |
|
I can't register because I can't select a country, the dropdown doesn't open. It did all right on the real site, although it would be nice to have a way to use the keyboard to locate the country, there are quite a few on the Earth. ;-)) |
Can you see the above image ? |
Yes, sure, but I'd like to see it in action so that I can look into the browser dev console. |
OK, I saved it, you can delete the message. |
Ok |
I can see the message, but I don't yet know what Windows has to do with it. :-) There are Firebase errors in the console but that's something else. |
Yes i know .. I also could not find that problem its working fine in debug mode and even android release mode.. But we go to live window error is coming. I think this libaray is not for windows thats why |
It certainly isn't, it's a web only plugin, but we're on the web now. :-) Basically, this is a federated plugin. This means that it has a central interface and implementation for platforms. In this particular case, a single implementation, nothing else: web. All the others (Android, iOS, Linux, macOS, Web) are missing because there is no sense, of course. That means that the default interface itself throws this error for any implementation: https://github.com/deakjahn/flutter_dropzone/blob/master/flutter_dropzone_platform_interface/lib/method_channel_flutter_dropzone.dart And then, the web implementation overrides it and does the actual work: https://github.com/deakjahn/flutter_dropzone/blob/master/flutter_dropzone_web/lib/flutter_dropzone_plugin.dart So, this is the genuine error message that you should see on anything but the web. But even then, how come Flutter thinks it's running on Windows? |
So what the solution is now ? |
defaultTargetPlatform comes from the Flutter engine, |
For me it doesn't work and I AM using html as the web renderer. I am testing this on Linux. |
And do you all have the problem in your own, fully developed app, or maybe we can create a minimal one that can be shared here? Because I'm yet to see it and this makes it awfully hard to diagnose... :-)) |
Switched to drop_zone, sorry. |
So do I and still I don't have the error. Strange. Yes, this shows Windows for me, too, but the drop still works all right. Anyway, I try to come up with a solution. |
To put it into some perspective, we never actually check the platform, there's no decision based on that. Simply, this is a web plugin that has its implementation in We have an abstract class and the static flutter_dropzone/flutter_dropzone_platform_interface/lib/flutter_dropzone_platform_interface.dart Line 54 in 903b16c
But as soon as the real web plugin is registered, this
And from now on, any part that uses this instance will use the web plugin. You only get the error message if this registration doesn't work and the instance keeps the original value (where all functions lead to a very deliberate exception): flutter_dropzone/flutter_dropzone_platform_interface/lib/method_channel_flutter_dropzone.dart Lines 14 to 15 in 903b16c
So, the question would be if you could debug this |
I don't know what happened, I was away for a day. But it's working now ... I think the real web plugin failed to register for some reason. And for confirmation, do I need all 3 plugins/packages in my dependencies ?? There is a generated file : |
Yes, this is what federated plugins are about, all current Flutter plugins that support various platforms are expected to use this structure. Yes, I removed that file. Flutter moved from Android embedding v1 to v2 gradually, less and less plugins and apps used the old one, so it no longer gets generated these days. I don't have it, either, but it remained in the repo. Even when it was used, it was generated automatically. I'm glad to hear it works for you but then we didn't solve the problem this time around, either. :-) Anyway, I can only ask anybody who still experiences this issue to put a breakpoint or a log write into that |
Facing the same problem with mac-OS. I know the plugin is for web, and we are also building a website. When we deploy our website, such error occurs of target platform unsupported. |
Then please, read the comment just above and try to apply a breakpoint or a log write to see. |
Had a similar issue that I resolved by running 'flutter clean' |
I encountered it once, also on MacOS. Didn't tweak anything, just built the flutter web once again and the error is gone. |
same, only after deployment. |
for me, setting the web renderer to canvaskit when building for release solved my problem. But still don't know what exactly caused the problem. |
|
i got same, but |
May I reiterate my message from Feb 18? We won't be able to find it out without somebody actually seeing this problem looking into the breakpoint mentioned there... |
NB |
DropzoneView: TargetPlatform.windows is not supported. -My project only web project not desktop or android, ios. |
Please, have a look at #61 (comment) |
I'm running into this same issue as well |
I'm not sure how to go about the 61 comment you referenced @deakjahn. Can you break it down? Update: On further reading, I understand better now, but not fully. As the error only occurs in deployed sites, how do we debug that function? |
@DavidOrakpo As you probably found in that comment, the problem is not directly in the plugin but in Flutter not calling it when it should. As I never was able to reproduce it, I can't really determine anything until somebody whole actually experiences the issue can debug it. This shouldn't be that hard, all browsers have very large and sophisticated Developer Tools (Ctrl+Shift+I or F12). You could find the code mentioned above and put a breakpoint, much like in any other programming environment. |
We're not yet sure whether #89 solves this. Could those of you who have problems with this try that modification? |
I am using this library in my web app not desktop app but I am still facing this issue . its working fine in debug mode but when we go to live server or you say release mode i am facing this issue
The text was updated successfully, but these errors were encountered: