Jump to content

Unable to start local development server

Recommended Posts

Would anyone be able to help me on this, please?

I'm trying to set up Squarespace local development server on my machine. I followed the documentation on this page https://developers.squarespace.com/local-development.

and here's what I've done:

- install squarespace server through npm

- enable developer mode on my site & clone it locally

- start my local squarespace server by running squarespace-server https://dragonfly-parrotfish-xtjs.squarespace.com/ --auth command.

- i got prompt Please navigate to the following URL:https://login.squarespace.com/api/1/login...

- After following the prompts, please enter the code shown in the browser:

- I copied the code I got from clicking the URL and paste it as respond of the prompt.

But I got following error message:

Unable to start server, shutting down
javax.servlet.ServletException: io.dropwizard.jersey.setup.JerseyServletContainer-2b2954e1@35fd41e0==io.dropwizard.jersey.setup.JerseyServletContainer,jsp=null,order=1,inst=false,async=true
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:692)
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428)
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:369)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:101)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:406)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:256)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.server.Server.start(Server.java:418)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:382)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
        at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44)
        at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
        at io.dropwizard.cli.Cli.run(Cli.java:78)
        at io.dropwizard.Application.run(Application.java:93)
        at com.squarespace.developer.DevelopmentServer.main(DevelopmentServer.java:61)
Caused by: java.lang.IllegalArgumentException: Expected state does not match received state.
        at com.squarespace.developer.auth.SiteLoginHelper.performFullAuthorization(SiteLoginHelper.java:92)
        at java.util.Optional.orElseGet(Optional.java:267)
        at com.squarespace.developer.auth.SiteLoginHelper.initializeTokens(SiteLoginHelper.java:57)
        at com.squarespace.developer.DevelopmentServerLifecycleListener.onStartup(DevelopmentServerLifecycleListener.java:34)
        at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:179)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
        at javax.servlet.GenericServlet.init(GenericServlet.java:244)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671)
        ... 49 common frames omitted
javax.servlet.ServletException: io.dropwizard.jersey.setup.JerseyServletContainer-2b2954e1@35fd41e0==io.dropwizard.jersey.setup.JerseyServletContainer,jsp=null,order=1,inst=false,async=true
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:692)
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428)
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:369)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:101)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:406)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:256)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
        at org.eclipse.jetty.server.Server.start(Server.java:418)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
        at org.eclipse.jetty.server.Server.doStart(Server.java:382)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
        at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44)
        at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
        at io.dropwizard.cli.Cli.run(Cli.java:78)
        at io.dropwizard.Application.run(Application.java:93)
        at com.squarespace.developer.DevelopmentServer.main(DevelopmentServer.java:61)
Caused by: java.lang.IllegalArgumentException: Expected state does not match received state.
        at com.squarespace.developer.auth.SiteLoginHelper.performFullAuthorization(SiteLoginHelper.java:92)
        at java.util.Optional.orElseGet(Optional.java:267)
        at com.squarespace.developer.auth.SiteLoginHelper.initializeTokens(SiteLoginHelper.java:57)
        at com.squarespace.developer.DevelopmentServerLifecycleListener.onStartup(DevelopmentServerLifecycleListener.java:34)
        at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:179)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
        at javax.servlet.GenericServlet.init(GenericServlet.java:244)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671)
        ... 49 more

Thanks in advanced!

Link to comment

Hi @Ima,

I was having the same issue. I submitted a ticket to Squarespace and they identified that there was an issue with their code. It has now been resolved. To get your site back up and running you should just need to update your local Squarespace Server by opening a new terminal and running this command:

npm install -g @squarespace/server

You should now be on version 1.6.2.

When you load up your site, you might need to refresh the content cached by adding the query ?nocache=true to the end of localhost:9000; like this:

http://localhost:9000/?nocache=true

That will get you the latest content from your site.

I hope this fixes it for you. In the future, try contacting Squarespace directly too, they have always been very helpful to me.

Link to comment

Thanks, I received the same update this evening. It's good news.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
  • 2 weeks later...
  • 1 year later...

Hello @Ima,

Thanks for posting your question!

I will echo @summitdigitaluk and recommend to get in touch with our support folks, so we can have a look at this.

Thanks,

Alex

Build together: Together, we make up a community of Squarespace professionals. Lean on your fellow community members for support and welcome diverse perspectives. 
Work in progress: Trust that we are all working for the collective good of Circle members and their clients. 
Keep it light mode: Balance productivity with joyful creativity and curiosity.

Link to comment
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.