Coder Social home page Coder Social logo

fbns-react's People

Contributors

mgp25 avatar nemanjan00 avatar valga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fbns-react's Issues

Incorrect client stack value

$this->clientStack = self::CLIENT_STACK;

Just did a slight review here while trying to debug an issue with my own library, should this not be:

$this->clientStack = self::FBNS_CLIENT_STACK;

It doesn't seem to have any negative effect right now in any case.

Call to a member function write() on null

Exception

Exception 'Error' with message 'Call to a member function write() on null in /app/vendor/valga/fbns-react/src/Lite/ReactMqttClient.php:615'

Stack trace

#0 /app/vendor/valga/fbns-react/src/Lite/ReactMqttClient.php(493): Fbns\Client\Lite\ReactMqttClient->startFlow(Object(BinSoul\Net\Mqtt\Flow\IncomingPublishFlow))
#1 /app/vendor/valga/fbns-react/src/Lite/ReactMqttClient.php(465): Fbns\Client\Lite\ReactMqttClient->handlePacket(Object(BinSoul\Net\Mqtt\Packet\PublishRequestPacket))
#2 /app/vendor/valga/fbns-react/src/Lite/ReactMqttClient.php(391): Fbns\Client\Lite\ReactMqttClient->handleReceive('2\xAC\x04\x00\x0276*\xADx\xDA\x95R]o...')
#3 /app/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): Fbns\Client\Lite\ReactMqttClient->Fbns\Client\Lite\{closure}('2\xAC\x04\x00\x0276*\xADx\xDA\x95R]o...')
#4 /app/vendor/react/stream/src/Util.php(71): Evenement\EventEmitter->emit('data', Array)
#5 /app/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): React\Stream\Util::React\Stream\{closure}('2\xAC\x04\x00\x0276*\xADx\xDA\x95R]o...')
#6 /app/vendor/react/stream/src/DuplexResourceStream.php(193): Evenement\EventEmitter->emit('data', Array)
#7 [internal function]: React\Stream\DuplexResourceStream->handleData(Resource id #34791, Object(React\EventLoop\StreamSelectLoop))
#8 /app/vendor/react/event-loop/src/StreamSelectLoop.php(236): call_user_func(Array, Resource id #34791, Object(React\EventLoop\StreamSelectLoop))
#9 /app/vendor/react/event-loop/src/StreamSelectLoop.php(205): React\EventLoop\StreamSelectLoop->waitForStreamActivity(990672)

composer.json

{
  "require": {
        "php": ">=7.0.0",
        "ext-curl": "*",
        "ext-mbstring": "*",
        "ext-bcmath": "*",
        "react/event-loop": "^0.4.3",
        "react/promise": "^2.5",
        "react/socket": "^0.8",
        "binsoul/net-mqtt-client-react": "^0.3.2",
        "clue/socks-react": "^0.8.2",
        "clue/http-proxy-react": "^1.1.0",
        "valga/fbns-react": "^0.1.8",
    }
}

Update composer requirements

Hello @valga !

In the latest version of Instagram API we use:

use BinSoul\Net\Mqtt\DefaultPacketFactory;

Since we are using an outdated version we are getting:

Fatal error: Uncaught Error: Class 'BinSoul\Net\Mqtt\DefaultPacketFactory' not found in /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime/Mqttot/ReactMqttClient.php:124
Stack trace:
#0 /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime/Mqtt.php(573): InstagramAPI\Realtime\Mqttot\ReactMqttClient->__construct(Object(InstagramAPI\React\Connector), Object(React\EventLoop\ExtEventLoop), NULL, Object(InstagramAPI\Realtime\Mqtt\StreamParser))
#1 /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime/Mqtt.php(130): InstagramAPI\Realtime\Mqtt->_getClient()
#2 /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime.php(119): InstagramAPI\Realtime\Mqtt->__construct(Object(InstagramAPI\Realtime), Object(InstagramAPI\React\Connector), Object(InstagramAPI\Realtime\Mqtt\Auth), Object(InstagramAPI\Devices\Device), Object(InstagramAPI\Instagram), Object(React\EventLoop\ExtEventLoop), Object(Monolog\Logger), Array)
#3 /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime.php(80): InstagramAPI\Realtime->_buildMqttClient()
#4 /Users/MarkZuckerberg/Doc in /Users/MarkZuckerberg/Documents/GitHub/Instagram/src/Realtime/Mqttot/ReactMqttClient.php on line 124

DefaultPacketFactory is only available in:

"binsoul/net-mqtt-client-react": "^0.6.0", and upwards. Because of this change, it is also required:

"react/socket": "^1.3",

So it would be great if you could update composer to avoid:

  Problem 1
    - valga/fbns-react 0.1.9 requires react/socket ~0.8 -> satisfiable by react/socket[v0.8.1, v0.8.8, v0.8.2, v0.8.6, v0.8.9, v0.8.4, v0.8.0, v0.8.5, v0.8.11, v0.8.12, v0.8.3, v0.8.10, v0.8.7] but these conflict with your requirements or minimum-stability.
    - valga/fbns-react 0.1.9 requires react/socket ~0.8 -> satisfiable by react/socket[v0.8.1, v0.8.8, v0.8.2, v0.8.6, v0.8.9, v0.8.4, v0.8.0, v0.8.5, v0.8.11, v0.8.12, v0.8.3, v0.8.10, v0.8.7] but these conflict with your requirements or minimum-stability.
    - valga/fbns-react 0.1.9 requires react/socket ~0.8 -> satisfiable by react/socket[v0.8.1, v0.8.8, v0.8.2, v0.8.6, v0.8.9, v0.8.4, v0.8.0, v0.8.5, v0.8.11, v0.8.12, v0.8.3, v0.8.10, v0.8.7] but these conflict with your requirements or minimum-stability.
    - Installation request for valga/fbns-react ^0.1.9 -> satisfiable by valga/fbns-react[0.1.9].

Also your packagist isn't automatically updated, probably the hook was outdated, I requested an update through packagist so now it has 0.1.9.

Best regards!

Error while registering device

I got this error
Failed to register package 'com.instagram.android': Out of bounds vec access: invalid index 1 #0 /var/www/flib/messaging/realtime/delivery/RealtimeDeliveryAuth.php(35): RealtimeDeliveryAuth::genSetLoginStateFromInstagramAuthToken() #1 /var/www/flib/messaging/realtime/delivery/RealtimeDeliveryAuth.php(13): RealtimeDeliveryAuth::genSetAuthFromUserIDAndSessionInfo() #2 /var/www/flib/messaging/realtime/RealtimeDeliveryHandler.php(61): RealtimeDeliveryAuth::genSetAuthFromEndpointState() #3 /var/www/flib/__generated__/ThriftMeerkatStep/fbcode/rtgw/v2/extif/delivery.thrift/RealtimeDeliveryBackend.php(426): RealtimeDeliveryHandler->sendRealtimeDeliveryRequest() #4 /var/www/flib/thrift/core/ThriftAsyncProcessor.php(38): RealtimeDeliveryBackendAsyncProcessorBase->process_sendRealtimeDeliveryRequest() #5 /var/www/flib/thrift/servers/base/ThriftServer.php(364): ThriftAsyncProcessor->processAsync() #6 /var/www/flib/alite/x/controller/thrift/XThriftControllerBaseTrait.php(41): ThriftServer->genHandleHTTPRequest() #7 /var/www/flib/alite/x/controller/thrift/XThriftBridgeController.php(34): XThriftController->genThriftResponse() #8 /var/www/flib/init/routing/ZeusGodOfThunderAlite.php(226): XThriftBridgeController->genResponse() #9 /var/www/flib/attribution/AttributionEdge.php(83): Closure$ZeusGodOfThunderAlite::genMain#4() #10 /var/www/flib/gates/turbo/context/BaseTurboGatesContext.php(262): AttributionEdge::runWithDeferredAttributionResolution() #11 /var/www/flib/init/routing/ZeusGodOfThunderAlite.php(227): BaseTurboGatesContext->genRunWithoutCatching() #12 /var/www/flib/init/zeusgodofthunder/__entrypoint.php(118): ZeusGodOfThunderAlite->genMain() #13 /var/www/flib/init/zeusgodofthunder/__entrypoint.php(53): ZeusGodOfThunderEntryPoint::genMain() #14 (): gen_zeusgodofthunder_main() #15 (): Closure$__SystemLib\enter_async_entry_point() #16 (): HH\Asio\join() #17 (): __SystemLib\enter_async_entry_point() #18 {main}
My register functoion:
$client->register(Constants::PACKAGE_NAME, Constants::FACEBOOK_ANALYTICS_APPLICATION_ID) ->then(static function (Registration $registration) { $this->_logger->info('Received a non-empty token.' . $registration->getToken()); $this->emit('fbns_token', [$registration->getToken()]); })->otherwise(static function ($e) { $this->_logger->error($e); });
Any ideas what can be wrong?

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.