bazaar icon indicating copy to clipboard operation
bazaar copied to clipboard

Can't connect my flarum installation to flagrow

Open maicol07 opened this issue 6 years ago • 28 comments

Steps to reproduce

  1. Install Bazaar
  2. Click the Connect button (plug icon)

Expected behaviour

Bazaar opens a page where you can connect your flagrow account

Actual behaviour

Bazaar opens an about:blank page and write an error in the log (see below)

Configuration

Operating system: Linux Mint 19.2

Version of Bazaar: 0.4 Version of Flarum: 0.1.0-beta9 Other extensions:

Flarum core 0.1.0-beta.9
PHP version: 7.3.9-1+ubuntu18.04.1+deb.sury.org+1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, sodium, session, standard, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, Zend OPcache
+----------------------+---------------+--------+
| Flarum Extensions    |               |        |
+----------------------+---------------+--------+
| ID                   | Version       | Commit |
+----------------------+---------------+--------+
| flarum-approval      | v0.1.0-beta.8 |        |
| flarum-bbcode        | v0.1.0-beta.8 |        |
| flarum-emoji         | v0.1.0-beta.8 |        |
| flarum-lang-english  | v0.1.0-beta.9 |        |
| flarum-flags         | v0.1.0-beta.9 |        |
| flarum-likes         | v0.1.0-beta.9 |        |
| flarum-lock          | v0.1.0-beta.9 |        |
| flarum-markdown      | v0.1.0-beta.9 |        |
| flarum-mentions      | v0.1.0-beta.9 |        |
| flarum-statistics    | v0.1.0-beta.9 |        |
| flarum-sticky        | v0.1.0-beta.9 |        |
| flarum-subscriptions | v0.1.0-beta.9 |        |
| flarum-suspend       | v0.1.0-beta.9 |        |
| flarum-tags          | v0.1.0-beta.9 |        |
| flarum-auth-facebook | v0.1.0-beta.9 |        |
| flarum-pusher        | v0.1.0-beta.9 |        |
| flarum-auth-github   | v0.1.0-beta.9 |        |
| flarum-auth-twitter  | v0.1.0-beta.9 |        |
| extiverse-bazaar     | 0.4.0         |        |
| nearata-lang-italian | v0.1.0-beta.9 |        |
+----------------------+---------------+--------+
Logs:
[2019-09-14 10:56:14] production.ERROR: Exception: Connecting failed in /var/www/html/community/vendor/extiverse/bazaar/src/Api/Controllers/ConnectController.php:35
Stack trace:
#0 /var/www/html/community/vendor/flarum/core/src/Http/RouteHandlerFactory.php(40): Extiverse\Bazaar\Api\Controllers\ConnectController->handle(Object(Zend\Diactoros\ServerRequest))
#1 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
#2 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
#3 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#4 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#5 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(25): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#6 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#7 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(56): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#8 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#9 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#10 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#11 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#12 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#13 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/StartSession.php(62): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#14 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#15 /var/www/html/community/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#16 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#17 /var/www/html/community/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(29): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#18 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#19 /var/www/html/community/vendor/flarum/core/src/Api/Middleware/HandleErrors.php(42): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#20 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#21 /var/www/html/community/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#22 /var/www/html/community/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#23 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#24 /var/www/html/community/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#25 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#26 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#27 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#28 /var/www/html/community/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#29 /var/www/html/community/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#30 /var/www/html/community/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#31 /var/www/html/community/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
#32 /var/www/html/community/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
#33 /var/www/html/community/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
#34 /var/www/html/community/public/index.php(22): Flarum\Http\Server->listen()
#35 {main}  

maicol07 avatar Sep 14 '19 11:09 maicol07

That is odd @maicol07 ; can you send me the last digits of the IP where Flarum is installed on?

luceos avatar Sep 14 '19 12:09 luceos

46 if you mean the ones after the last dot

maicol07 avatar Sep 14 '19 12:09 maicol07

I'll take a look within the next 10 hours, hope you don't mind.

luceos avatar Sep 14 '19 14:09 luceos

I have been unable to find anything, can you send me your forum domain; if you want to do that privately you can email me (check the composer.json) or chat me up on discord luceos#0001, thanks.

luceos avatar Sep 14 '19 18:09 luceos

It's community.maicol07.it. Don't worry, this URL soon will become public (actually I'm configuring Flarum)

maicol07 avatar Sep 14 '19 19:09 maicol07

I have the same problem. @luceos Did you find the problem already?

chrisonline avatar Sep 28 '19 18:09 chrisonline

I have had little time to look into it. My obligations to Flarum and the continued refactoring towards making flagrow.io extiverse having been making it hard to dive deep into problem solving lately.

I've seen some issues with Bazaar being unable to connect to Flagrow.io; did any of you see more specific errors in the log files?

luceos avatar Sep 28 '19 18:09 luceos

@luceos see my logs in the first post

maicol07 avatar Sep 28 '19 18:09 maicol07

@maicol07 but you do have a token in your bazaar settings modal?

luceos avatar Sep 28 '19 19:09 luceos

Yes. If I delete it, Bazaar won't work

maicol07 avatar Sep 28 '19 19:09 maicol07

Okay odd, because that means your connection is blocked somewhere. What hosting environment do you use? And is your DNS dynamic?

luceos avatar Sep 29 '19 17:09 luceos

I use Linux Mint 19.3 (based on Ubuntu 18.04) and yes, unfortunately my DNS is dynamic

maicol07 avatar Sep 29 '19 17:09 maicol07

I am not sure yet, but the dynamic dns might be the cause.. Do you know how often your IP changes?

luceos avatar Sep 29 '19 17:09 luceos

It changes when everytime modem restarts or when there is maintenance on the network cables

maicol07 avatar Sep 29 '19 17:09 maicol07

I am not sure yet, but the dynamic dns might be the cause.. Do you know how often your IP changes?

I don't have a dynamic IP. I use my own hosting on a Synology NAS.

chrisonline avatar Sep 29 '19 19:09 chrisonline

And I don't have a token in my bazaar settings.

chrisonline avatar Sep 29 '19 19:09 chrisonline

Can you check your value of allow_url_fopen?

luceos avatar Oct 20 '19 21:10 luceos

It's On

maicol07 avatar Oct 21 '19 04:10 maicol07

I have the same issue on a cpanel hosting strangely enough I had installed @maicol07 wordpress SSO plugin ...I removed it but still the problem did not resolved

alihbuzaid avatar Jan 29 '20 15:01 alihbuzaid

@Sndan please provide more information, like your php version, the allow_url_fopen value and the output of php flarum info..

luceos avatar Jan 29 '20 16:01 luceos

allow_url_fopen is enabled from cpanel

error logs: [2020-01-29 15:40:23] production.ALERT: Failed Bazaar call to flagrow.io: Internal Server Error
error from JS consol : GET http://forum.xxx.com/api/bazaar/connect net::ERR_INVALID_CHUNKED_ENCODING 200 (OK)

Flarum core 0.1.0-beta.11.1 PHP version: 7.2.26 Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, bcmath, bz2, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd,gettext, iconv, imap, intl, json, ldap, exif, mysqlnd, odbc, PDO, pgsql, Phar, posix, pspell, shmop, SimpleXML, snmp, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlwriter, xsl, zip, mysqli, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, wddx, xmlreader, xmlrpc, i360, ionCube Loader +----------------------+----------------+--------+ | Flarum Extensions | | | +----------------------+----------------+--------+ | ID | Version | Commit | +----------------------+----------------+--------+ | flarum-approval | v0.1.0-beta.8 | | | flarum-bbcode | v0.1.0-beta.8 | | | flarum-emoji | v0.1.0-beta.10 | | | flarum-lang-english | v0.1.0-beta.11 | | | flarum-flags | v0.1.0-beta.10 | | | flarum-likes | v0.1.0-beta.9 | | | flarum-lock | v0.1.0-beta.9 | | | flarum-markdown | v0.1.0-beta.10 | | | flarum-mentions | v0.1.0-beta.10 | | | flarum-statistics | v0.1.0-beta.9 | | | flarum-sticky | v0.1.0-beta.9 | | | flarum-subscriptions | v0.1.0-beta.9 | | | flarum-suspend | v0.1.0-beta.10 | | | flarum-tags | v0.1.0-beta.11 | | | ziymed-lang-arabic | 0.1.1 | | | extiverse-bazaar | 0.4.1 | | +----------------------+----------------+--------+

alihbuzaid avatar Jan 30 '20 09:01 alihbuzaid

is there a way to install premium plugin without connecting into flagrow ?

alihbuzaid avatar Feb 01 '20 14:02 alihbuzaid

@Sndan yes, generate a token in the flagrow.io dashboard and see the instructions under "access token": https://flagrow.io/about/premium-extensions

luceos avatar Feb 02 '20 06:02 luceos

@luceos I have more info about the error pressing the DEBUG button:

GET https://community.maicol07.it/api/bazaar/connect

null

This is the message contained in the modal with error details

maicol07 avatar Feb 04 '20 15:02 maicol07

@maicol07 Sorry Maicol, this slipped. I am not sure how to resolve this with so little information, a gut feeling might point to your connection to the internet. But I really can't tell from the server or your logs.

Best is to use the token method and use composer directly instead.

luceos avatar Feb 10 '20 19:02 luceos

Hi there, I'm having the same problem. Made a fresh install of flarum with pockethold as I can't use composer.

Version of Bazaar: 0.4.1 Version of Flarum: 0.1.0-beta.13 allow_url_fopen is enabled in plesk

Flarum Admin page says "Oops! Something went wrong. Please reload the page and try again." When I open Chrome dev console, I get this:

"Failed to load resource: the server responded with a status of 500"

Also I do not have an API token (https://github.com/extiverse/bazaar/issues/148)

dartrax avatar Jul 07 '20 08:07 dartrax

Bazaar is deprecated, flagrow.io is down. Please use composer directly, see https://discuss.flarum.org/d/5151-bazaar-the-extension-marketplace/273

luceos avatar Jul 07 '20 11:07 luceos

Aah ok. I didn't know. So I'll have to copy everything to a local place (like xampp I guess), use composer and then load it up again. Still great that I was able to set it up without composer using pockethold as now i'm convinced that it will be worth the effort :) Good job! Flarum is great!

dartrax avatar Jul 07 '20 13:07 dartrax