Code Monkey home page Code Monkey logo

Comments (37)

ErikOnBike avatar ErikOnBike commented on June 21, 2024 1

Thx for helping out and testing these things out by the way! 🙏

from codeparadise.

denysos avatar denysos commented on June 21, 2024 1

Hello Erik,
it seems that this issue is fixed with

Pharo 12.0.0
Build information: Pharo-12.0.0+SNAPSHOT.build.1410.sha.6fa4632c0b60f6690d6af3f7f8fc6f3ab6240112 (64 Bit)

after the UFFI issue pharo-project/pharo#15980 fixed

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Hi @git-dmou

I'm really puzzled here. I tried the menu and all items work without a problem. Which Pharo version are you using and which VM version? I tried Pharo 10 and 12.

The code for the Component Examples does not seem special if compared to other applications.

Sunny regards,
Erik

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

@git-dmou I see you're using Pharo 12 (didn't read the title carefully enough)...

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

@git-dmou retried with new image, but still works.
Which OS are you on? No clue if this makes a difference, but seeing if I can reproduce this.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

Hello Erik,

I'm on windows 11, I've tried on 2 differents computers,

VM: 120-x64 2024-01-15 update

image pharo 12 from the same day

tried on chrome and Firefox.

I browsed the code quickly and saw no differences between apps in the building of url as you said !

from codeparadise.

astares avatar astares commented on June 21, 2024

Specific language setting on browser?

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

I've tried english on firefox and french on chrome

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Which characters are appended? You wrote 'random'. Does this mean it differs between executions?
Could you try and add a breakpoint in CpDevTools class >> #open and inspect what the value of choices is before making the selection and what the value of choice is after making the selection? This to check whether these random characters are coming from the Pharo image or whether the browser (plugin?) somehow adds these characters.
Thx

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

by random I mean a couple of different char at each exec.
for example : "À3" or "%10k" or "rš", appended to "http://localhost:8080/static/app.html?Component-Examples"

I'll try with the breakpoint

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024
Capture d'écran 2024-01-17 131902

apparently, no problems so far !

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Maybe also add a breakpoint on: WBWindowsWebBrowser class >> #shellExecute:file:parameters:directory:show:. That is sort of the last code being executed before it is handled to the OS (shell32 lib) to execute. See if lpFile is still without these random characters.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

here you are
image

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

you're right, non random chars in the pharo area !

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Hmmm...that still leaves the FFI stuff (but it works for other applications, so what would make this one special?), since it behaves the same in both Chrome and Firefox.
Could you try and update the method CpComponentExamplesWebApplication class >> #app and replace the content with:

app

	"Answer the unique identifier (a Symbol) for the receiver"

	^ #fixmesoon

Do a 'reset' from the CodeParadise menu and try to run the application (now named 'fixmesoon').

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

I tried like this :
it seems that any name finishing in "example" trigger the problem !
image

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

and it works !

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Not fully sure yet ;-).
Could you try and replace the method with this one:

app

	"Answer the unique identifier (a Symbol) for the receiver"

	^ #'Cmponent-Examples'

I made it a single character shorter, but still has the same 'ending'. I am wondering whether the final URL size (56 bytes/chars) is causing an issue. This is 2 longs (2x 4 bytes) short of 64 bytes, which might be some sort of magic size limit.
Please let me know what happens.

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Remember that Soelace-Examples works okay, but also ends with '-Examples'.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

It works, it should be a length problem ....

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

however, "building-my-first-app" is longer, but has no problem

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Maybe not every length. Could you try the following version? If this works, it is not perse the length. This is a version with the same length but different content. We're just trying to find the cause by taking away possibilities ;-)

app

	"Answer the unique identifier (a Symbol) for the receiver"

	^ #'Component-Examplex'

Remember to reset the menu before trying to open the application.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

again:
http://localhost:8080/static/app.html?Component-Examplex%E2%82%AC/
http://localhost:8080/static/app.html?Component-Examplex%C3%9Es

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Okay. So it seems this specific length is an issue. I'm investigating a little here. I will try to come back with some more tests if you're okay with that.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

your welcome

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Could you give me the result of evaluating the following in a Playground?

#shell32 asFFILibrary calloutAPIClass

It should probably answer something like FFICalloutAPI or TFCalloutAPI.
It is either the regular or the threaded FFI version.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

TFCalloutAPI

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Could you please evaluate/inspect the following?

TFUFFIDerivedTypeMarshallingTest new
	ffiLibrary: TFTestLibraryUsingSameThreadRunner ;
	pointerToString: 'http://localhost:8080/static/app.html?Component-Examples'.

Does it answer the correct (duplicated) String or does it also have random characters added?
And this variant?

TFUFFIDerivedTypeMarshallingTest new
	ffiLibrary: TFTestLibraryUsingWorker ;
	pointerToString: 'http://localhost:8080/static/app.html?Component-Examples'.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

image

Capture d'écran 2024-01-17 144755

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

Have dug deep into the code (into primitives and generated FFI code), but can't find the location where things go wrong. My feeling is it has to do with the FFI (Foreign Function Interface). I'll post a question on the Discord channel. Hopefully someone can help out. Thx so far and I will keep you updated.

from codeparadise.

git-dmou avatar git-dmou commented on June 21, 2024

quite tricky !
the best thing to do so far on windows is to choose a name for the app and to test the generated url in the browser !

from codeparadise.

astares avatar astares commented on June 21, 2024

Strange, doing variations:

WebBrowser openOn: 'http://localhost:8080/static/app.html?Component-Examples'  - APPENDS

WebBrowser openOn: 'http://localhost:8080/static/map.html?Component-Examples'  - APPENDS


WebBrowser openOn: 'http://localhost:8080/static/app.html?ComponentExamples' - WORKS

WebBrowser openOn: 'http://localhost:8080/app.html?Component-Examples'  WORKS

WebBrowser openOn: 'http://localhost:8080/something/app.html?Component-Examples' WORKS

WebBrowser openOn: 'http://localhost/static/app.html?Component-Examples' - WORKS 

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

@astares It seems the exact length is an issue. I also posted this on Discord (see link below).
Could you try the following on your machine as well?

WebBrowser openOn: 'https://pharo.org?abcdefghijklmnopqrstuvwxyz1234567890ok'.

https://discord.com/channels/223421264751099906/786544722235228160/1197203535285211166

from codeparadise.

astares avatar astares commented on June 21, 2024

Seems to be Pharo related as on DOS it works without additional characters

image

from codeparadise.

astares avatar astares commented on June 21, 2024

@astares It seems the exact length is an issue. I also posted this on Discord (see link below). Could you try the following on your machine as well?

WebBrowser openOn: 'https://pharo.org?abcdefghijklmnopqrstuvwxyz1234567890ok'.

https://discord.com/channels/223421264751099906/786544722235228160/1197203535285211166

Yes - same issue. Seems length based

image

from codeparadise.

astares avatar astares commented on June 21, 2024

opened pharo-project/pharo#15980 as it is more Pharo related than a Code paradise issue

from codeparadise.

ErikOnBike avatar ErikOnBike commented on June 21, 2024

@denysos Thx.
@astares for the fix!
Closing the issue.

from codeparadise.

Related Issues (8)

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.