Giter Site home page Giter Site logo

Comments (14)

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert are you by any chance using something like BrowserSync?

from web-push-php.

Minishlink avatar Minishlink commented on June 4, 2024

I never have encountered this issue, sorry.

It doesn't look like this issue comes from the server side, but if it's the case, one way to be sure is to look if the correct requests are sent with a tool like Fiddler.

EDIT: you will need to set the Client proxy to Fiddler like this:

$webPush->getBrowser()->getClient()->setProxy('http://127.0.0.1:8888');

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

@Minishlink Seems like Marco is right, thanks tough I've noted this.

@marco-c I didn't expect that to be a problem honestly, is there any work-around to allow it to work ?
I think I've read somewhere it doesn't work with Browser Sync on, but I didn't even think to check if I ever enabled it.

        _register : function() {
          var objectInstance = this;

          navigator.serviceWorker.register(this.serviceWorker, {
            'scope' : "{{ "./"  }}"
          }).then(function(serviceWorkerRegistration) {
            var subscription = serviceWorkerRegistration.pushManager.getSubscription();

            serviceWorkerRegistration.pushManager.subscribe({userVisibleOnly: true}).then(
              function(pushSubscription) {
                objectInstance.registerSubscription(pushSubscription.endpoint);
              }
            );
          });
        },

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

I'm not really familiar with browserSync, I just recall that it was causing problems.
Are you running both Firefox and Chrome at the same time? Can you try what happens if you run only one browser?

I would file an issue on the browser-sync repo: https://github.com/BrowserSync/browser-sync/issues/new, since this behavior is certainly confusing.

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

I'm using the internal one from Firefox.

If both browsers are open, it works perfectly.

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert yeah, I don't know what's going on, but it's definitely unrelated to this library, it's a browser-sync issue.

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

Okay, thanks tough, I hope it will eventually get fixed, the latest Firefox update didn't cover it.

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert it's a browser-sync issue, not a Firefox issue.

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert to clarify, are you using browser-sync (https://github.com/BrowserSync/browser-sync) or are you using Firefox Sync (the feature to synchronize data between your Firefox devices/installations). They're two completely different things.
I'm confused because you said the internal one from Firefox.

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

The one from Firefox

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert OK, then it's a completely different thing and shouldn't cause any problems with Web Push.
Can you share some minimal source code that presents the problem? Are you seeing the problem if Firefox Sync is enabled and not seeing the problem if it is disabled (in the same profile, or have you created a new Firefox profile)?

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

After unsyincing my account and logging back in it works as expected, maybe they'll patch this soon, not sure. But it seems to work as expected, BrowserSync Library shouldn't be able to sync Service Workers anyway, so I never expected it to work using that, but using the Firefox built-in functionality it works if you logout and login under the new version.

from web-push-php.

marco-c avatar marco-c commented on June 4, 2024

@rusuandreirobert I've never experienced this bug in Firefox. I mentioned BrowserSync because I vaguely recalled a friend had problems while using it, but BrowserSync and Firefox Sync are two completely different things, they aren't two different implementations of the same thing.

Anyway, are you able to reproduce the problem consistently? Or has it just disappeared? If you're able to reproduce it consistently, it would be great if you could help pinpointing the issue.

from web-push-php.

robertuniqid avatar robertuniqid commented on June 4, 2024

I'm still testing it intensivelly, as this system would need to serve around 6000 - 7000 customers of an store, after I know the system is stable and sorted out I'll probably write an article on how I achieved this, mentioning all the set backs

from web-push-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.