Git: Branch of Branch is not fully Rendering CSS - css

I am new to Git. For my project, I have a branch called staging which is a branch off of master. I created a new branch called salesforce_update off of the staging branch. When I am on the staging branch, everything runs and renders well. When I switch over to the salesforce_update branch, it runs fine but when it renders, all of the styling on the page is gone. The data on the page displays correctly and functionality still works. Is there a reason why this is happening?

If you are using a task runner to compile your assets you may run into issues when switching branches with it running. Make sure to restart your task runner after switching.

Related

How to debug the absence of hydration in a nextjs page?

Background:
We are have noticed that in production and in some staging environments, that the onClick handlers on a SSR page are failing to be called. By comparing working and non-working (npm run start) deployments we've determined that the non-working deployments are not calling the render() methods of the components on the page immediately after page reload, whereas the working deployments do. We are assuming that means that hydration is not occurring.
Development deployments (npm run dev) work flawlessly
We are seeing no browser-side console messages.
We are seeing no server side warnings
The npm build --debug suggests only to upgrade to the new ChunkGraph API. Otherwise no warnings.
We are now wondering...
QQ:
Short of starting with a fresh create-next-app again and gradually evolving the app towards our current implementation until it breaks, what are the suggested ways of determining the root cause(s) of a problem like this?
For some reason, my hydration issues only showed up in production, and only on the server. Running next build and next start didn't show any errors. Since user3624334's answer didn't really help me, I figured I'd reply with how I ended up finding the culprit.
Since I deploy to Vercel, and use Vercel's review apps, I ended up creating a Pull Request where I remove half of the page that was having the hydration issues, and continued bisecting until I found out which component was causing the issues. It took me three tries to find the component.
Once I had the component it was quite easy to figure out what was causing the issues (for me the hydration issue was caused by a timestamp being rendered in different ways).
This also explains why user3624334's answer didn't work for me, since I opened the page straight after building, at which point the time was still the same as during next build!
One challenge here is that it appears that when SSR page hydration fails in next.js, a warning message will not necessarily be generated.
I hope someone has a better suggestion than the following, but I will offer this human script that worked several times for me:
git checkout -b "hydration-problem-02" to create a branch for this effort
add a console.log('render called') to the top of the render() method of pages/_app.js. This should produce a message on each hydrate, making it easy to notice when the page does/does-not hydrate.
Then repeatedly:
simplify a significant portion of the app.
npm run dev to run in dev mode
confirm that your change did not break the app in unexpected ways
rm .next/ node_modules/ package-lock.json
npm install && npm run build && npm run start
confirm that the above command completed successfully
refresh the page in the browser
check for the message in the browser console.
git commit -am "msg that indicates what you changed and if it helped"
if the problem remains, repeat these steps
Doing the commits above should help make the process more fool-proof. Ex. If you think you might have forgotten to test in production mode, you can go back to that commit and retest to confirm you did not mis-test.
Once you have a working and non-working commit of the app, you can do a binary search for the error, either adding or removing smaller and smaller pieces of function.
The root causes of quiet hydration failures I've seen include:
two modules that mutually import each other
an import '..../bootstrap.js' in a component rather than _app.js

project update doesn’t activate on client side javascript changes

I've just had to reinstall Windows on my computer and in the process reinstall Meteor (the most current version).
I copied across all of the client/server/package files from an archived version of my project and it's running fine for the most part except the project only auto updates when I make changes to html or css files (and it does so very quickly!) When I edit the javascript files it not only doesn't auto update but it ignores my changes even when I manually refresh the page. I have to stop the project and then start it again to see those changes. Also worth noting that server side javascript changes activate an update immediately, this is exclusively on the client side.
Any thoughts? I don't even know where to begin with debugging this

Pushing Git commits through RStudio

I have started to use Git package inside RStudio . It seems to work fine for Master branch. But adding another branch, you can commit any changes through the GUI but the "push" button doesn't work. Any thoughts how this can be fixed? I can do the push through the terminal but not GUI.
As per Hadley's explanation:
If you try to synchronise this [new] branch to GitHub from inside RStudio,
you’ll notice that push and pull are disabled. To enable them,
you’ll need to first tell Git that your local branch has a remote
equivalent:
git push --set-upstream origin <branch-name> After you’ve done that
once, you can use the pull and push buttons as usual.

Protractor implicit waiting not working when using grunt-protractor-runner

I am writing e2e Tests for some JS application at the moment. Since I am not a JS developer I was investigating on this theme for a while and ended up with the following setup:
Jasmine2 as testing framework
grunt as "build-tool"
protractor as test runner
jenkins as CI server (already in use for plenty java projects)
Although the application under tests is not written in angular I decided to go for protractor, following a nice guide on howto make protractor run nicely even without angular.
Writing some simple tests and running them locally worked like a charm. In order to implicitly wait for some elements to show up in den DOM I used the following code in my conf.js:
onPrepare: function() {
browser.driver.manage().timeouts().implicitlyWait(5000);
}
All my tests were running as expected and so I decided to go to the next step, i.e. installation in the CI server.
The development team of the aplication I want to tests was already using grunt to build their application so I decided to just hook myself into that. The goal of my new grunt task is to:
assemble the application
start a local webserver running the application
run my protractor test
write some test reports
Finally I accomplished all of the above steps, but I am dealing with a problem now I cannot solve and did not find any help googling it. In order to run the protractor test from grunt I installed the grunt-protractor-runner.
The tests are running, BUT the implicit wait is not working, causing some tests to fail. When I added some explicit waits (browser.sleep(...)) everything is ok again but that is not what I want.
Is there any chance to get implicitly waiting to work when using the grunt-protractor-runner?
UPDATE:
The problem does not have anything to do with the grunt-protractor-runner. When using a different webserver I start up during my taks its working again. To be more precisley: Using the plugin "grunt-contrib-connect" the tests is working using the plugin "grunt-php" the test fails. So I am looking for another php server for grunt now. I will be updating this question.
UPDATE 2:
While looking for some alternatives I considered and finally decided to mock the PHP part of the app.

Monodevelop+WebApp+Selenium+NUnit: How to approach?

I am starting an ASP.Net application in MonoDevelop (blank slate, hobby). I recently used Selenium on a Java based project for a client so thought I would start implementing some testing right from the get go in this project.
I have a solution with two projects: "Website", and "Website Tests". Unfortunately, I can only run one project at a time. The Website Tests always fail because the website is not running.
Is there a way around this, or am I going in the wrong direction?
Updated Details:
Confirmed WebsiteTests is set as a "Library"
Project Options -> General -> Build -> Compile Target == Library
Exact steps taken
Select: "Website" Project
Select: Run with Debugging
Verify site is running
Select: View -> Pads -> Unit Tests
Select: Login -> TestTest (just a blank test, no contents)
RESULT: pop-up "An application is already running and will have to be stopped. Do you wish to continue?"
EXPECTED: ability to run tests
Running in separate MonoDevelop instances also has the same problem. This is unfortunate as it makes it impossible to step through your tests and site (have to choose one).
Selenium+Mono is a non-viable solution.
https://code.google.com/p/selenium/issues/detail?id=5258
Also, MonoDevelop (on Ubuntu) does not appear to have the ability to run multiple processes. This appears to extend to multiple instances of MonoDevelop.
As a work around, you can run the NUnit-Gui separately. Keep the NUnit GUI open as you develop the tests. This is a little old-school, but it works.
Open Test Project
Make changes to project
Compile
Switch to NUnit GUI window
Run Tests
This still doesn't work as the current Mono+Selenium stack can only run one test at a time. The test project needs to be shutdown and restarted between test runs.

Resources