mrcendre / motion

A Flutter plugin to apply a gyroscope-based motion effect to widgets.
GNU General Public License v3.0
39 stars 15 forks source link

🐛 Bug Report: Canvas of a disposed surface in flutter web. #11

Open rvndsngwn opened 1 year ago

rvndsngwn commented 1 year ago

Screenshot 2022-12-19 at 5 37 33 PM

I'm getting an error in the web, and the screen has gone black.

Motion(child: myWidget);

mrcendre commented 1 year ago

Hello, thanks for the report.

Unfortunately, I couldn't reproduce the issue you're facing.

Could you please indicate the Flutter version you're using, as well as the full code to reproduce the problem ?

rvndsngwn commented 1 year ago

Flutter (Channel stable, 3.3.10, on macOS 13.0.1 22A400 darwin-arm

My code sample

  Widget build(BuildContext context, WidgetRef ref) {
    return Motion(
      child: ListTile(
        title: Text(
          response.number,
          style: context.headline6,
        ),
        subtitle: Text(
          response.description,
          style: context.subtitle2,
        ),
      ),
    );
  }
alanchan-dev commented 1 year ago

Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale en-MY) Having same issue on Flutter Web, can be reproduced with:

class HomeView extends StatelessWidget {
  const HomeView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Motion(
        child: Card(
          color: Colors.amber,
          child: SizedBox(
            height: 250,
            width: 350,
          ),
        ),
      ),
    );
  }
}
alanchan-dev commented 1 year ago

After a few tries, I found out that it works when using html renderer instead of canvaskit, is it possible to fix for canvaskit?

rvndsngwn commented 1 year ago

Now I'm using https://pub.dev/packages/motion_v2/

mrcendre commented 1 year ago

Now I'm using https://pub.dev/packages/motion_v2/

Hello @rvndsngwn, I understand your frustration but why on earth would you republish this package under your own name ? You're definitely crossing a red line here.

What if new features are added to the original plugin ? Your "v2" will have less features than the "v1" ? That makes no sense at all.

I am willing to fix every reported bug to the best of my ability, but I cannot accept that you take credit for the whole package by adding a few lines of code. So, I kindly ask you to remove, discontinue and/or unlist your "motion_v2" package. If you have not by tomorrow, I will file a complaint to pub.dev and prepare to take more serious action with "Mohesu Enterprises".

When you need any kind of urgent fix for a professional project on a package that you do not own, you must depend on a Git reference, like so :

dependencies:
     motion_v2:
       git:
         url: git://github.com/rvndsngwn/motion.git
         ref: master

Or use your private pub.dev mirror, but do not publish a "v2" version of the package under your own name. Both solutions would be way better than stealing people's work publicly.

rvndsngwn commented 1 year ago

Hi @mrcendre, I apologize for publishing an unauthorized copy. My organization and I do not support or increase Intellectual Property Violations.

This package was published due to a misunderstanding. You haven't responded to #12's pull request and this package hasn't been updated since 4 months ago. There's issue #11 related to "Canvas of a disposed of surface in flutter web" that I've created, but you haven't fixed it or announced it's being fixed. Due to this situation, I will feel the package is no longer maintained properly, so I fork and published it for future maintenance.

The motion_v2 is a referenced package for the community and open-source. I'm not promoted as an individual package, a private package, or a corporate package. I cannot claim any credit for the motion_v2. It is all yours. I am only the package's maintainer.

If you say to maintain the motion package properly then I will permanently delete the motion_v2 package.

If you decide not to maintain it, you can assign me to maintain it. And I will permanently delete the motion_v2 package.

A forked and open-source repository

I love and support the open-source and the flutter community.

vatsaltanna commented 1 year ago

I understand your concern but I am also agree with @rvndsngwn comment. I am thankful to you that you have created this wornderfull package but creating package is not all it takes but maintaining it intially is very necessary. I didn't know someone has already released package else I would have used updated package for my package work release and wasn't suffered the delay.

mrcendre commented 1 year ago

If you say to maintain the motion package properly then I will permanently delete the motion_v2 package

@rvndsngwn @vatsaltanna Of course I will keep maintaining it, but let's be very clear : Open Source is not about you.

That's right, Open Source Maintainers Owe You Nothing.

Most developers of the Flutter community work on these packages you love on their free time. They are not paid to do what they do. Unfortunately, the society we live in taught us to feel entitled to receive the best possible experience with as little effort as possible. But you can't make someone's work obsolete just because you are unhappy with it, right ? That's just totally unfair. How can anyone think it's okay to simply take a package from the original developer's hands and republish it ?

There were many alternatives to just waiting or republishing this package in order to fix your problem. In this issue's case, it only boiled down to checking kIsWeb and pass the right FilterQuality to the widget. This issue, and the fix suggested by PR #12 was specific to certain Flutter versions and thus, irrelevant. I encourage you to check this PR's discussion for resolution steps, most specifically this comment.

But please, above all, always remember that any open-source license states the following :

  • The way the software is today is all that the maintainers ever agree to provide you (bugs and all)
  • The maintainers provide no assurances that the software will ever work for any user or use case (even documented ones)
  • The maintainers are never liable for any problems caused by any use of the software (including damages that require you to pay for repairs)
  • You must agree with the above to have any right to use the software

So @rvndsngwn, I kindly ask you to remove motion_v2 or transfer the package to me.

vatsaltanna commented 1 year ago

Hi @mrcendre , I didn't wanted to stretch this issue, so I appologise for any inconvenience. I will find some other work around for my package needs and again thanks for creating this awesome package keep up the good work 🙂 .

rvndsngwn commented 1 year ago

It is important to respect the wishes of the @mrcendre of an open source package, as you have put in a lot of effort to create and maintain it. As your requests that a package be discontinued, it is likely best to follow your guidance and discontinue the package. However, it is also important to consider the community's needs and any ongoing support for the package. I will always try to give my best to community. At this situation, I respect your decision. So I am discontinuing the package _motionv2. And I’ll be glad if I’ll be able to contribute in original package.

Thanks for great package & I apologies for inconvenience 🙂