Help. my v6 site is crashing. error 500

my site has been up for 2 years.
it hasn't been updated in over a year with wappler updates - but nothing's changed. same DOcean site, same SQL db server, everything the same.

I've made a few changes to queries and some code over the past few days with no issue.
Today I needed to change logos on the bottom of my homepage - having trouble with that (needs to be another thread) but I really only edited index and main.ejs. Was working and then it wasn't.

One time when I tested it I got this on the screen - see attached image.
I have a staff.ejs and admin.ejs and they both work fine, they even require a login.
But this simple front screen has crapped out.
I went to a backup and replaced BOTH main & index and got the same thing... so its not something (in those 2 files) messed up today.

I guess some other file/route/etc got messed up by me somehow today but after an hour I can't resolve this.

Thx for any help.

my code around line 99:

    <div is="dmx-browser" id="browser1"></div>
    <dmx-notifications id="notifies1"></dmx-notifications>

    <div is="dmx-view" id="content" class="flex-grow-1">
        <%- await include(content, locals); %>
    </div>

    <div class="bg-light h-auto fixed-bottom">

Hi Robert,

The Wappler include on the index.ejs page may have been deleted or changed. Please check that index page is correctly assigned to the main layout page.

Wappler include head-page="layouts/main"

looks okay?

<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="index" appConnect="local" components="{dmxBootstrap5Navigation:{}}" -->
<div class="container wappler-block pt-5 pb-5">
    <div class="row">
        <div class="text-center col-12 col-md-10 offset-md-1 col-lg-8 offset-lg-2 col-xl-6 offset-xl-3">

Wappler include looks okay.

Try running node install / update commands and redeploy the project locally. Wappler has released many updates over the last year, and some of these updates may need to be redeployed.

I have also experienced that exiting and restarting Wappler application forces any changes to be applied to the project. It displays a message if there are any changes that need to be applied.

Are you sure you don't have another backup? And then use some diff software to identify differences

For the future you should use Git

git, sure.
but for now...

  1. another backup? this project was "LM2"
    is there an easy way to edit this project to look at my backup folder?

  2. the home page doesn't even hit my 'real' database tables.
    It just shows an asset and a menu.
    Since its running in Dev mode, it shows this in the Output window:

/Users/jaymerjaymer/Documents/wappler/LM2/views/layouts/main.ejs:99
    97| 
    98|     <div is="dmx-view" id="content" class="flex-grow-1">
 >> 99|         <%- await include(content, locals); %>
    100|     </div>
    101| 
    102|     <div class="bg-light h-auto fixed-bottom">

remember, it works fine on my other 2 routes... AND
if I go around the home page, it works fine on all 3 of my menu options that are on the home page:

http://localhost:3000/guest/guest_vehicles
http://localhost:3000/c
http://localhost:3000/d

It seems to be ONLY a issue on the initial home page.
But on the other pages, it DEFINITELY is picking up some global vars I have set in main.ejs, because it seems the rest of the app works - the globals pick up paths for my CDN, and lightbox parms.

I did exit wappler, which said there was some problem in closing down and offered to re-open the editor.
I did and problem persisted.

Plz read my reply to user Apple

Hey Robert,

Can you please check also in your content page (index.ejs), if the meta tag exists and is correct?
For example:
<meta name="ac:route" content="/">

Just restarted Wappler. Here's from the Output window. No visible errors to me.

2024-09-26T16:13:49.813Z server-connect:setup:config {
  port: 3000,
  debug: true,
  secret: 'WM---------------R2E',
  tmpFolder: '/Users/jaymerjaymer/Documents/wappler/LM2/tmp',
  abortOnDisconnect: false,
  createApiRoutes: true,
  compression: true,
  redis: false,
  cron: true,
  static: { index: false },
  session: {
    name: 'lm2.sid',
    resave: false,
    saveUninitialized: false,
    store: { '$type': 'memory', ttl: 86400000 }
  },
  cors: {
    origin: false,
    methods: 'GET,POST',
    allowedHeaders: '*',
    credentials: true
  },
  globals: {},
  mail: {},
  auth: {},
  oauth: {},
  db: {},
  s3: {},
  jwt: {},
  stripe: {
    secretKey: 'sk_test_51KxlE---------aR1rhL'
  },
  env: {}
}

Also:

2024-09-26T16:13:50.014Z server-connect:setup:session init session store { '$type': 'memory', ttl: 86400000 }
2024-09-26T16:13:50.044Z server-connect:setup:upload Upload middleware configured.
2024-09-26T16:13:50.046Z server-connect:setup:routes Api route /api/admin/people/delete(.json)? created
2024-09-26T16:13:50.046Z server-connect:setup:routes Api route /api/admin/people/read(.json)? created
2024-09-26T16:13:50.046Z server-connect:setup:routes Api route /api/admin/people/search(.json)? created
2024-09-26T16:13:50.047Z server-connect:setup:routes Api route /api/admin/people/update(.json)? created
2024-09-26T16:13:50.047Z server-connect:setup:routes Api route /api/admin_note/admin_note_read(.json)? created
2024-09-26T16:13:50.047Z server-connect:setup:routes Api route /api/admin_note/admin_note_update(.json)? created
2024-09-26T16:13:50.048Z server-connect:setup:routes Api route /api/charts/conc_class_counts(.json)? created
2024-09-26T16:13:50.048Z server-connect:setup:routes Api route /api/charts/conc_class_counts_bad(.json)? created
2024-09-26T16:13:50.048Z server-connect:setup:routes Api route /api/charts/event_counts_OLD(.json)? created
2024-09-26T16:13:50.049Z server-connect:setup:routes Api route /api/reg_veh bak(.json)? created
2024-09-26T16:13:50.049Z server-connect:setup:routes Api route /api/reg_veh(.json)? created
2024-09-26T16:13:50.050Z server-connect:setup:routes Api route /api/registration/login(.json)? created
2024-09-26T16:13:50.050Z server-connect:setup:routes Api route /api/registration/register(.json)? created
2024-09-26T16:13:50.050Z server-connect:setup:routes Api route /api/registration/send_authcode(.json)? created
2024-09-26T16:13:50.051Z server-connect:setup:routes Api route /api/registration/validate_code(.json)? created
2024-09-26T16:13:50.051Z server-connect:setup:routes Api route /api/registration/whoami(.json)? created
2024-09-26T16:13:50.051Z server-connect:setup:routes Api route /api/security/is_staff(.json)? created
2024-09-26T16:13:50.052Z server-connect:setup:routes Api route /api/security/isadmin(.json)? created
2024-09-26T16:13:50.052Z server-connect:setup:routes Api route /api/security/user_loggedin(.json)? created
2024-09-26T16:13:50.052Z server-connect:setup:routes Api route /api/security/user_login(.json)? created
2024-09-26T16:13:50.052Z server-connect:setup:routes Api route /api/security/user_logout(.json)? created
2024-09-26T16:13:50.053Z server-connect:setup:routes Api route /api/security/user_registration(.json)? created
2024-09-26T16:13:50.053Z server-connect:setup:routes Api route /api/serverconnect1(.json)? created
2024-09-26T16:13:50.053Z server-connect:setup:routes Api route /api/stats/stats_conc1(.json)? created
2024-09-26T16:13:50.054Z server-connect:setup:routes Api route /api/stats/stats_conc_by_class(.json)? created
2024-09-26T16:13:50.054Z server-connect:setup:routes Api route /api/stats/stats_conc_by_class22(.json)? created
2024-09-26T16:13:50.054Z server-connect:setup:routes Api route /api/stats/stats_conc_by_class2_OLD(.json)? created
2024-09-26T16:13:50.055Z server-connect:setup:routes Api route /api/stats/stats_conc_by_class_22bak(.json)? created
2024-09-26T16:13:50.055Z server-connect:setup:routes Api route /api/stats/stats_conc_class_OLD(.json)? created
2024-09-26T16:13:50.055Z server-connect:setup:routes Api route /api/stats/stats_down1(.json)? created
2024-09-26T16:13:50.055Z server-connect:setup:routes Api route /api/stats/stats_makes_OLD(.json)? created
2024-09-26T16:13:50.056Z server-connect:setup:routes Api route /api/test/get_vehicles(.json)? created
2024-09-26T16:13:50.056Z server-connect:setup:routes Api route /api/unique_makes_for_event(.json)? created
2024-09-26T16:13:50.056Z server-connect:setup:routes Api route /api/unique_models_for_event_makes(.json)? created
2024-09-26T16:13:50.057Z server-connect:setup:routes Api route /api/user/user_roles(.json)? created
2024-09-26T16:13:50.057Z server-connect:setup:routes Api route /api/vehicle_count(.json)? created
2024-09-26T16:13:50.057Z server-connect:setup:routes Api route /api/vehicle_query_byid(.json)? created
2024-09-26T16:13:50.057Z server-connect:setup:routes Api route /api/vehicle_query_byid_staff(.json)? created
2024-09-26T16:13:50.058Z server-connect:setup:routes Api route /api/vehicle_update_byid(.json)? created
2024-09-26T16:13:50.058Z server-connect:setup:routes Api route /api/vehicles_all(.json)? created
2024-09-26T16:13:50.058Z server-connect:setup:routes Api route /api/vehicles_for_event(.json)? created
2024-09-26T16:13:50.058Z server-connect:setup:routes Api route /api/vehicles_map_test(.json)? created
2024-09-26T16:13:50.059Z server-connect:setup:routes Api route /api/vehicles_single(.json)? created
2024-09-26T16:13:50.059Z server-connect:setup:routes Api route /api/vehicles_update(.json)? created
2024-09-26T16:13:50.059Z server-connect:setup:routes Api route /api/vehicles_zones(.json)? created
App listening at http://localhost:3000

Hello
here's my route setup, and the entire index page.
For grins, I commented ALL code inside the DIV on index.ejs and same result.
image

<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="index" appConnect="local" components="{dmxBootstrap5Navigation:{}}" -->
<div class="container wappler-block pt-5 pb-5">
    <div class="row">
        <div class="text-center col-12 col-md-10 offset-md-1 col-lg-8 offset-lg-2 col-xl-6 offset-xl-3">
            <h4>2024 Lake Mirror Classic<br><small class="text-muted">Online Vehicle Catalog</small></h4>
            <a href="https://www.lakemirrorclassic.com"><button class="btn btn-primary mb-3 visually-hidden">Visit LakeMirrorClassic.com
                </button></a>
            <img class="wappler-type-picture w-100" src="/assets/images/app_image1.jpg">
        </div>
    </div>
    <div class="h-auto">
    </div>
</div>
<meta name="ac:route" content="/">

PS _ If you view the LIVE site at vehicles.lakemirrorclassic.com , you'll see it operating fine - but the logos at the bottom are too large in Browser on PC.
I was trying to correct that when this error started.

I'm afraid to upload over the LIVE for fear it will break.

I just don't understand why only 1 page on the whole site throws the error 500.

You should make a backup of the live site anyway, just in case. Then you can always roll back to it should uploading cause issues.

See:

great advice - you mean make a backup of whats up on DO... from DO?
How would I do that - I always let Wappler manage uploading to there.

I seem to have restored service. The destination PAGE on my route somehow got changed by my clicking around after a year.

I changed my / path to do directly into a page in the guest section and it worked fine.

When I changed it back to the home page, it became this:
image

thats not what it was earlier... it was

image

thank you all for your suggestions.

1 Like

I'm guessing you've already managed to do this but I think DO has a backup feature (not 100% certain) or you can FTP in and download all the files so you have a local backup copy.

1 Like