Playground is broken

Feel free to talk about non programming issues here.
Post Reply
User avatar
neildarlow
Posts: 4
Joined: Thursday 24th August 2023 2:22pm

Playground is broken

Post by neildarlow »

Hi,

I'll post this here rather than in the programming sub-forums. It appears the Playground is broken. Any attempt to execute code shows a container start failure message in the output window.

ATB,
Neil Darlow
User avatar
BruceSteers
Posts: 1572
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Playground is broken

Post by BruceSteers »

It links to the Playground from the main gambas website.
https://gambas.sourceforge.net/en/main.html#

The error is there.

I have reported it to the development team.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Playground is broken

Post by cogier »

It's not the Development Team that needs to look at this, it's me. I will sort it as.soon as I can.

10:10am 30/03/2024
Now fixed

https://gambas.one/playground/
User avatar
BruceSteers
Posts: 1572
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Playground is broken

Post by BruceSteers »

cogier wrote: Saturday 30th March 2024 8:48am It's not the Development Team that needs to look at this, it's me. I will sort it as.soon as I can.

10:10am 30/03/2024
Now fixed

https://gambas.one/playground/
Aaaah , so does the gambas website playground link to you than?
If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Playground is broken

Post by cogier »

The playground is in a Digital Ocean Droplet. This is basically a headless Ubuntu distro with Gambas installed via the ppa. So yes, they link to Gambas One. The main page does have a link to the Playground and the Farm. https://wordpress.gambas.one/
User avatar
neildarlow
Posts: 4
Joined: Thursday 24th August 2023 2:22pm

Re: Playground is broken

Post by neildarlow »

Thank you for fixing this. It's very useful for trying little things.

ATB,
Neil Darlow
User avatar
BruceSteers
Posts: 1572
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Playground is broken

Post by BruceSteers »

I think it's broken again.

Do the Run/Play buttons on the gambas wiki also use the same system as that's showing the same message...

"docker start" requires at least 1 argument.
See 'docker start --help'.

Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]

Start one or more stopped containers
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1572
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Playground is broken

Post by BruceSteers »

How complex is the playground code?

does it need a docker to be secure?

I made something similar http://138.68.116.47/cgi-bin/Scripter.gambas

It can use gbs3 or Eval and forbids use of Shell and Exec with only this much code..

' Gambas class file

Export

Public p As Process

Public Sub WebButton1_Click()

  Dim sName As String = File.SetExt(Temp(), "gbs")
  Dim sTxt As String = taCode.Text

  If InStr(sTxt, "Shell ", 0, gb.Like) Or If InStr(sTxt, "Exec ", 0, gb.Like) Then
    Message("Shell and Exec are not allowed.")
    Return
  Endif

  If WebComboBox1.Index = 0 Then
    File.Save(sName, taCode.Text)
    taResult.Text = ""
    p = Exec ["gbs3", sName] For Read As "PROC"
    While p.State = Process.Running
      Wait 0.1
      If Not Object.IsValid(p) Then Break
    Wend
    Kill sName

  Else
    Try taResult.Text = Eval(taCode.Text)
    If Error Then taResult.Text = "Error:\n" & Error.Text
  Endif

End

Public Sub PROC_Read()

  Dim sText As String
  sText = Read #p, -256
  taResult.Text &= sText

End

If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Playground is broken

Post by cogier »

OK. I have fixed it again. I'm going to have to do something with it to stop it breaking all the time.
Post Reply