UndefinedOffset/silverstripe-codebank

CodeBank Desktop unable to contact online server

jazi4 opened this issue · 13 comments

jazi4 commented

Thank you for making CodeBank. I installed it successfuly on my hosting. All OK , except I can't connect the Desktop Version to online Server - get error message "Could not Connect to the server.
Message: Server version mismatch, please check for updates, if your install is up to date please ask the server administrator to update the server". This happens for current version of SilverStripe and for older v3.1.0 version. To check things , I installed SilverStrip(3.1.0)/CodeBank onto my PC using same user info as Online. When I use CodeBank Air App , I can successfuly login to local host. Please could you help me as I would like to be able to interact with the online version via Desktop Codebank Air App. Thanks

Do you have access to the server logs? If you do when you attempt to connect with the desktop client is there any error message written to the log. Also what happens when you hit http://domain.com/code-bank-install-folder/code-bank-api?

jazi4 commented

Hi,
Thanks for your reply - I will try to look into logs shortly , but in
the meantime I checked
http://domain.com/code-bank-install-folder/code-bank-api?
The response was
Action 'code_bank_api' isn't available on class CodeBank.
Please advise
On 31 July 2015 at 1:26 PM, "Ed Chipman" wrote:

Do you have access to the server logs? If you do when you attempt to

connect with the desktop client is there any error message written to
the log. Also what happens when you hit
http://domain.com/code-bank-install-folder/code-bank-api?

Reply to this email directly or view it on GitHub.

That could be a clue as to what is going on, if you look in mysite/_config/routes.yml what is there (if that file exists). As well what is in CodeBank/_config/routes.yml. Also try running http://domain.com/code-bank-install-folder/dev/build?flush=all.

jazi4 commented

Hi,
mysite/_config/routes.yml does not exist in either local or online
installations
CodeBank/_config/routes.yml - online version contains this---
Name: codebank

After: framework/routes#rootroutes

Director:
rules:
'code-bank-api': 'CodeBank_ClientAPI'
which is the same as for local
Just did a fresh dev/build?flush=all but still can't get access with
CodeBank Air App
Will now try to read Server Logs - what does CodeBank Air App identidy
itself and what port does it use?
On 31 July 2015 at 4:50 PM, "Ed Chipman" wrote:

That could be a clue as to what is going on, if you look in

mysite/_config/routes.yml what is there (if that file exists). As well
what is in CodeBank/_config/routes.yml. Also try running
http://domain.com/code-bank-install-folder/dev/build?flush=all.

Reply to this email directly or view it on GitHub.

Ya the mysite/_config/routes.yml should normally not exist I just wanted to double check.

As for the port it actually uses port 80, since it's using Adobe's AMF tech to communicate with the server so it should be serving over http more or less. That code-bank-api should be talking to the CodeBank_ClientAPI class. Where you mention above that it says "Action 'code_bank_api' isn't available on class CodeBank.". That is interesting what is the full url you are using when you hit that? You can omit the domain for posting here I just want to make sure it's correct. If you had admin/codeBank in the url try removing that before you put the code-bank-api on the url.

jazi4 commented

The URL I used was
mysilverstriperootfolder/CodeBank/code-bank-api?Yes I removed the
admin part in the url , and I tried with CodeBank and codeBankHere is
what I see in the Visitor Logs (Error Log is empty)URL :
myinstallationfolder/code-bank-api
Referring URL: app:/CodeBank.swf
Status : 200
Method : POST
Protocol : HTTP 1.1
User Agent : Mozilla/4.0 (compatible; MS.....Adobe Air 18

When I visit installationfolder/code-bank-api in Browser I see
Zend Amf Endpoint
One thing - My Local install for WAMP has SilverStripe installed in
folder called silverstripe , but online version has shortened name to
prevent those looking to find Silverstripe Installations.Would this
shortened name cause some kind of referencing problem for CodeBank?If
so where would I have to point to the shortened name?
On 31 July 2015 at 5:59 PM, "Ed Chipman" wrote:

Ya the mysite/_config/routes.yml should normally not exist I just

wanted to double check.

As for the port it actually uses port 80, since it's using Adobe's

AMF tech to communicate with the server so it should be serving over
http more or less. That code-bank-api should be talking to the
CodeBank_ClientAPI class. Where you mention above that it says "Action
'code_bank_api' isn't available on class CodeBank.". That is
interesting what is the full url you are using when you hit that? You
can omit the domain for posting here I just want to make sure it's
correct. If you had admin/codeBank in the url try removing that before
you put the code-bank-api on the url.

Reply to this email directly or view it on GitHub.

Ok make sure in the desktop client you use the full url to myinstallationfolder/ when you are trying to connect to the server. As you can see it's adding the code-bank-api to the url.

Also as a side how did you install code bank did you install via composer, or download from the releases page https://github.com/UndefinedOffset/silverstripe-codebank/releases/tag/3.1.0 ? If you downloaded from the releases page did you grab the module or stand alone? If you just grabbed the sources from the repo that is very likely the issue make sure you use the module or standalone release file.

If you installed via composer make sure you use composer require undefinedoffset/silverstripe-codebank 3.1.*@stable.

jazi4 commented

Yes , using full url to installation folder - the same url as I use to
access in browser where I get the message "Welcome to SilverStripe!
This is the default home page. You can edit this page by opening the
CMS. You can now access the developer documentation, or begin the
tutorials."
WAMP version installed using (in WAMP/www)
composer create-project silverstripe/installer ./silverstripe
which showed Installing silverstripe/installer (3.1.13)
Then I Created CodeBank Folder Manually + unzipped v3.1.0 to it.

For the Online installs I noticed there was a problem in Composer
trying to access Git (I have git installed OK om my PC so no problem
there)
In fact getting Composer to download to my Hosting was a challange as
was getting
it to run by just typing 'composer' , but I figured out a way!
So the 1st install was
composer create-project silverstripe/installer ./myfolder1
Got error
"Failed to download composer/installers from source: Failed to clone
git@github.com/composer/installers.git ,
git was was not found , check that it is installed and in your PATH
env.
sh git: command not found
Now trying to download from dist

  • Installig composer/installers (dev-master e420b53)
    Downloading: 100%
    Installing silverstripe/framework (3.1.13) ....."
    Once above completed , I used
    composer require undefinedoffset/silverstripe-codebank

The 2nd install was done with
composer create-project silverstripe/installer ./myfolder2 3.1.0
(Same problem with git - I need to find out how to sort this for
Hosting)
Then
composer require undefinedoffset/silverstripe-codebank

*Could the problem be that the online installs were done via dist and
not git??
If so ,maybe a manual install would be best until I can get git
problem solved
with my hosting -could you please point me to the correct version of
Silverstripe
to download and install manually.

On 31 July 2015 at 6:40 PM, "Ed Chipman" wrote:

Ok make sure in the desktop client you use the full url to

myinstallationfolder/ when you are trying to connect to the server. As
you can see it's adding the code-bank-api to the url.

Also as a side how did you install code bank did you install via

composer, or download from the releases page
https://github.com/UndefinedOffset/silverstripe-codebank/releases/tag/3.1.0
? If you downloaded from the releases page did you grab the module or
stand alone? If you just grabbed the sources from the repo that is
very likely the issue make sure you use the module or standalone
release file.

If you installed via composer make sure you use composer require

undefinedoffset/silverstripe-codebank 3.1.*@stable.

Reply to this email directly or view it on GitHub.

Ya manual install would probably be best where you are having issues with composer. Make sure you grab either the standalone from the latest release or the module depending on what you are thinking of doing. Also see https://github.com/UndefinedOffset/silverstripe-codebank#installation-standalone for manual install instructions. Save yourself a hop and just go to https://github.com/UndefinedOffset/silverstripe-codebank/releases/tag/3.1.0 to get the downloads remember to choose standalone or module not source.

jazi4 commented

Hi ,
OK , I deleted the Codebank Folder in the 2nd install (v3.1.0) and
uploaded the version from your site using FileZilla.did
dev/build/flush=all , and when I tried , I connected CodeBank Air App
on 1st try - Excellent!!Now the thing is , when I think back , I was
getting 500ServerError problems after intalling things online ,so I
used the script sitescan.php (for Couch CMS etc) which I used to
quickly set Right Permissions of Files Folders and create index.html.
So either this messed with CodeBank folders in some way or the
Composer installdid something wrong.In fact , I just check further
using pathsync and there are masses of differences between your
versionand what Composer installed - maybe it fetched an older
release?When I remember , after installing the 1st time , I mistakenly
entered some text into the IAP causing error[Notice] Undefined
variable: sng
GET myinstall/codeBank/agreement
Line 50 in ....CodeBank/code/control/CodeBankIPAgreement.phpOnce I
realised I had to refence a text(in sng , () ) and added it to folder
, error resolved.(Don't know if you had this happen to any Users
before - just thought I'd mention it as there was no referenceof
having to add a file for IAP and edit CodeBankIPAgreement.php).One
other thing to feedback , I am still using anolder version Of Opera
(12.17) and Syntax Highlighting isnot working - But when I checked on
iPad - All was OK and when I went back to PC + tried CoolNova andit
was OK too. Opera must have mesed up their javascript?Also when I use
CoolNova there was a message about Adobe Flash Player - is this part
of SilverStripethat tries to run Flash?
Will you be updating CodeBank at all soon?
Is it possible to import Textmate Bundles or any other format of
Existing Snippets(even from EditPlus?)to save having to add them all
manually?
Many thanks for all your assistance in helping me to resolve this
issue.

UPDATE: Opera - cleared the Cache completeley and all related Cookies.
Now Syntax highlighting OK on both installs.

On 31 July 2015 at 7:26 PM, "Ed Chipman" wrote:

Ya manual install would probably be best where you are having issues

with composer. Make sure you grab either the standalone from the
latest release or the module depending on what you are thinking of
doing. Also see
https://github.com/UndefinedOffset/silverstripe-codebank#installation-standalone
for manual install instructions. Save yourself a hop and just go to
https://github.com/UndefinedOffset/silverstripe-codebank/releases/tag/3.1.0
to get the downloads remember to choose standalone or module not
source.

Reply to this email directly or view it on GitHub.

Seems as though github's interpreting of your last post messed up the formatting. But it sounds like you're issue has been resolved. As for the missing file you referenced it could be just a file that didn't upload correctly and the differences could also be attributed to that. If you're confident this is resolved please close the issue. If I missed anything let me know.

jazi4 commented

Yes , the issue is resolved and thanks again for helping. (Since my
last update , I've figured out how to enable Git on my Hosting , so
Composer installations should go much more reliably now.)

Is it possible to import Textmate Bundles or any other format of
Existing Snippets (even from EditPlus?) to save having to add them all
manually? If not , would you consider adding this feature?
On 04 August 2015 at 8:41 PM, "Ed Chipman" wrote:

Seems as though github's interpreting of your last post messed up the

formatting. But it sounds like you're issue has been resolved. As for
the missing file you referenced it could be just a file that didn't
upload correctly and the differences could also be attributed to that.
If you're confident this is resolved please close the issue. If I
missed anything let me know.

Reply to this email directly or view it on GitHub.

I'm glad everything is working. As for the import functionality no that isn't something available in 3.1 but definitely something that could be looked at for 3.2, I've opened an issue regarding importing.