Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 error for sessionprotected-counter #1439

Open
mengelhart opened this issue Jul 29, 2024 · 4 comments
Open

500 error for sessionprotected-counter #1439

mengelhart opened this issue Jul 29, 2024 · 4 comments

Comments

@mengelhart
Copy link

I'm just starting to teach myself Seaside (and still very much learning Smalltalk) and was browsing the example applications just now and noticed the sessionprotected-counter example doesn't work and returns a 500 Internal Server error when running in Squeak 6.0 (current release) in the current release of Seaside that was pulled down when I just installed it the other day (v 3.5.9).
As I get more comfortable I'll see if I can determine what's causing this.

WACookie(Object)>>doesNotUnderstand: #oldNetscapeString
	Receiver: a WACookie
	Arguments and temporary variables: 
		aMessage: 	oldNetscapeString
		exception: 	MessageNotUnderstood: WACookie>>oldNetscapeString
		resumeValue: 	nil
	Receiver's instance variables: 
		key: 	'seaside_browser_session'
		path: 	'/examples/sessionprotected-counter'
		pathEncoded: 	'/examples/sessionprotected-counter'
		domain: 	nil
		ports: 	nil
		value: 	'lXGukUzHCA_a74vnuf4F'
		version: 	1
		expiry: 	nil
		secure: 	false
		discard: 	false
		comment: 	nil
		commentUrl: 	nil
		httpOnly: 	true
		sameSite: 	'Strict'
		maxAge: 	nil

[] in WAWebServerAdaptor>>responseFrom:
	Receiver: a WAWebServerAdaptor
	Arguments and temporary variables: 
		aRequestContext: 	a WARequestContext url: 'http://localhost:8080/examples/sessio...etc...
		response: 	WebResponse(HTTP/1.1 302 Moved Temporarily

Location: http://localhos...etc...
		cookie: 	a WACookie
	Receiver's instance variables: 
		manager: 	a WAServerManager
		port: 	8080
		requestHandler: 	nil
		codec: 	a GRPharoUtf8Codec name: 'utf-8'
		server: 	a WebServer
		certName: 	nil

OrderedCollection>>do:
	Receiver: an OrderedCollection(a WACookie)
	Arguments and temporary variables: 
		aBlock: 	[closure] in WAWebServerAdaptor>>responseFrom:
		index: 	1
	Receiver's instance variables: 
		array: 	{a WACookie . nil . nil . nil . nil . nil . nil . nil . nil . nil}
		firstIndex: 	1
		lastIndex: 	1

WAWebServerAdaptor>>responseFrom:
	Receiver: a WAWebServerAdaptor
	Arguments and temporary variables: 
		aRequestContext: 	a WARequestContext url: 'http://localhost:8080/examples/sessio...etc...
		response: 	WebResponse(HTTP/1.1 302 Moved Temporarily

Location: http://localhos...etc...
	Receiver's instance variables: 
		manager: 	a WAServerManager
		port: 	8080
		requestHandler: 	nil
		codec: 	a GRPharoUtf8Codec name: 'utf-8'
		server: 	a WebServer
		certName: 	nil

[] in [] in WAWebServerAdaptor(WAServerAdaptor)>>process:
	Receiver: a WAWebServerAdaptor
	Arguments and temporary variables: 
		aNativeRequest: 	WebRequest(GET /examples/sessionprotected-counter HTTP/1.1

hos...etc...
		context: 	a WARequestContext url: 'http://localhost:8080/examples/sessionprotect...etc...
	Receiver's instance variables: 
		manager: 	a WAServerManager
		port: 	8080
		requestHandler: 	nil
		codec: 	a GRPharoUtf8Codec name: 'utf-8'
		server: 	a WebServer
		certName: 	nil


--- The full stack ---
WACookie(Object)>>doesNotUnderstand: #oldNetscapeString
[] in WAWebServerAdaptor>>responseFrom:
OrderedCollection>>do:
WAWebServerAdaptor>>responseFrom:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[] in [] in WAWebServerAdaptor(WAServerAdaptor)>>process:
[] in WACurrentRequestContext class(DynamicVariable class)>>value:during:
FullBlockClosure(BlockClosure)>>ensure:
WACurrentRequestContext class(DynamicVariable class)>>value:during:
WACurrentRequestContext class(GRDynamicVariable class)>>use:during:
[] in WARequestContext>>push:during:
FullBlockClosure(BlockClosure)>>ensure:
WARequestContext>>push:during:
[] in WAWebServerAdaptor(WAServerAdaptor)>>process:
FullBlockClosure(BlockClosure)>>ensure:
WAWebServerAdaptor(WAServerAdaptor)>>process:
WAWebServerAdaptor>>process:
MessageSend>>valueWithArguments:
WebServer>>invokeAction:request:
[] in WebServer>>dispatchRequest:url:
FullBlockClosure(BlockClosure)>>on:do:
WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:
[] in WebServer>>handleConnectionFrom:
FullBlockClosure(BlockClosure)>>on:do:
WebServer>>handleConnectionFrom:
[] in [] in [] in WebServer>>asyncHandleConnectionFrom:
FullBlockClosure(BlockClosure)>>on:do:
[] in [] in WebServer>>asyncHandleConnectionFrom:
FullBlockClosure(BlockClosure)>>ensure:
[] in WebServer>>asyncHandleConnectionFrom:
[] in FullBlockClosure(BlockClosure)>>newProcess

-----------------------------------------------------------------

VM: Mac OS - Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3339] 64 bit
Image: Squeak6.0 [latest update: #22149]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
@jbrichau
Copy link
Member

Hi, thanks for reporting.
Unfortunately, the Squeak port of Seaside is not very well maintained anymore. As you may have noticed, the builds are failing for Squeak. If you are dabbling with Seaside, I recommend using Pharo Smalltalk.

I will keep the issue, in case anyone who uses Squeak with Seaside picks it up and fixes it. This is an issue in the server adaptor for the http server in Squeak only.

@mengelhart
Copy link
Author

Thanks @jbrichau . I'm new to working Smalltalk and am not too keen on using Pharo at the moment. I'm still just teaching myself Smalltalk so I don't have a huge need for building major web applications at this point and most of Seaside appears to work (e.g. I can go through the tutorials I've found so far without any problems). But yes if you could keep it open maybe I'll get to the point where I can commit a PR to fix :)

@mengelhart
Copy link
Author

Also I was looking into the open issues and there appears to be a Platform Squeak label - are issues with Squeak generally labeled as such. I'm just trying to get a sense of many issues there are to tackle. I would hate to see Squeak support stop because that list gets too big for anyone to handle in their spare time. I'd love to get proficient enough on this to help out!

@marschall
Copy link
Contributor

I think this is a duplicate of #1392

WebClient-Seaside-Adaptor-pmm.3.mcz from https://ss3.gemtalksystems.com/ss/WebClient.html should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants